|mcol 44c2a984c1||7 months ago|
|qpaper||7 months ago|
|.gitignore||7 months ago|
|readme.rst||7 months ago|
|setup.py||7 months ago|
Python wallpaper-setter for X11.
This was originally written as an extension for the Qtile window manager (hence the name qpaper), though it works for X11 in general. It requires the same dependencies as Qtile, i.e. cairocffi and xcffib.
qpaper.Painter acts as the wallpaper setting interface.
Instantiate it with the name of the target display, and then either all screens
can be painter by using the
Painter.paint_all method, or an individual
screen using the
Painter.paint_screen method. These two methods can both
take optional these keyword args:
- image (
str) : path to image to set as wallpaper
- colour (
str) : hex code to simply set a colour instead of an image
- option (
str) : one of 'fill' or 'stretch'
Painter.paint_screen should also be passed an
int to index the
Installation via setup.py also installs a script named
qpaper that can
be used directly:
qpaper /path/to/wallpaper/image.png --option fill
To set wallpapers for all screens upon Qtile startup, add something like this to the Qtile config:
import os import qpaper from libqtile import hook @hook.subscribe.startup def startup(): qpaper.Painter(os.environ.get("DISPLAY")).paint_all( image='/home/user/wallpaper.png', option='fill', )