setroot
A library for setting desktop background image. It provides methods and types for a) querying screen’s monitor configuration, b) creating a pixmap which can be used as a background image and c) changing the root background.
The library serves the purpose similar to applications such as Esetroot,
xsetroot, fvwm-root etc. Since it communicates directly with the X display
it does not require external applications to accomplish its task.
Example usage
Features
The crate defines the following Cargo feature:
image, enabled by default, adds support forimagecrate and itsDynamicImagetype which can be rendered viaput_imagemethod and are automatically converted into proper format in sRGB colour space.
Limitations
The library has currently tho following limitations:
-
It does not offer features for resizing images or tiling images. It is left to the user to prepare correctly sized image that can be draw on the root pixmap.
-
It works with X11 display servers only and requires RandR 1.5+ extension to be present. This covers vast majority of X11 displays but might not work on Wayland desktops or in non-Unix-like environments.
-
It assumes the X display server uses 24/32-bit True Colour visual, i.e. that colours are represented as 32-bit numbers with 8 bits per channel. This should cover vast majority of cases and system configurations.