h1. backman
Backman is a random/fixed background image setter for major GTK desktops, X11, sway and other wlroots based wayland compositors.
h1. Supported
Backman is tested to work on i3, sway, GNOME (Wayland), GNOME (Xorg), Cinnamon, XFCE, Budgie. It may also work on other platforms but is not tested.
h1. Dependencies:
The program depends on swaybg, python3-toml (or python-toml), python3, hsetroot, bash.
h1. Installation:
p. Arch Linux (.pkg.tar.zst) and Debian packages (.deb) have been provided in releases section of Github.
p. To install from source: Meet the required dependencies and run the provided install script like this:
bc[bash]. sudo ./install
p. Prepending the install script with "sudo" or executing in super user environment is required.
p. If you are using Arch Linux, there is an AUR package, called "backman-git". You can install by cloning or using an AUR helper.
p. If you are using Debian and are familiar with Makedeb Package Repository (MPR), there is a package there, called "backman-git". You can install by cloning or using helper.
h1. Configuration
p. The configuration for backman resides at ~/.config/backman.toml The configuration follows the toml markup. The configuration contains three options:
p. Example configuration 1:
bc[toml]. mode = "random" directories = [ "/home/cat/pix/bg", "/usr/share/backgrounds" ] fix_bg = "/home/cat/pix/bg/btwarch-black.png"
p. Example configuration 2:
bc[toml]. mode = "fixed" directories = [ "/home/cat/pix/bg", "/usr/share/backgrounds" ] fix_bg = "/home/cat/pix/bg/btwarch-black.png"
p. Also note that you can also change these configurations without actually editing the configuration file, itself inside the program. See usage for knowing how.
h1. Usage
bc.. usage: backman [-h] [--previous] [--set] [--return-path] [--wal] [--change-mode mode] [--set-fix-bg /path/to/file] [--add-dir path/to/directory] [--rm-dir path/to/directory] [--list-dirs] [--set-temporary /path/to/file]
Backman is a random/fixed background image setter for major GTK desktops, X11, sway and other wlroots based wayland compositors
optional arguments: -h, --help show this help message and exit --previous, -p Use previous background image in set/return method instead of choosing random --set, -s Set the background, either random or fixed (as specified in configuration) --return-path, -r Return the path of background that would be set, either random or fixed --wal, -w Use wal to generate color schemes using returned/set background --change-mode mode, -m mode Change mode to specified as arguement --set-fix-bg /path/to/file, -f /path/to/file Set fixed background image in configuration --add-dir path/to/directory Add a directory to configuration --rm-dir path/to/directory Remove a directory from configuration --list-dirs, -l List directories specified in configuration --set-temporary /path/to/file, -i /path/to/file Set temporary background disregarding any configuration
p. Explaination:
bc[bash]. backman -m fixed
p. To change to random, you can execute:
bc[bash]. backman -m random
bc[bash]. backman -i /home/user/Pictures/1.jpg
bc[bash]. backman --add-dir /usr/share/backgrounds --rm-dir /home/user/Pictures
h1. Warnings
The program prints out warnings to sterr. So, if you want to pipe or use the output of the program's stdout, you would need to send the sterr to /dev/null Example:
bc[bash]. backman -r 2>/dev/null
h1. Reminder and tip
The background set by this script (or swaybg) is not persistent across logout and logins in standalone window managers. It just disappears after quitting compositor/window manager. To have a persistent feel, add the following command to your autostart script (maybe in your window manager/compositor configuration):
bc[bash]. backman -s 2>/dev/null
h1. License
This program is licensed under MIT license
h1. Thanks
The project waves out a great thanks to sway team for developing swaybg and hsetroot developer Martin Hradil.
The licenses of both the projects should be respected and followed.
p. Windows background setting code is brought from https://github.com/mammuth/bing-wallpaper/blob/master/bing_wallpaper.py and thus this project waves out a thanks to Maximilian Muth for this code. (licensed under GPLv2)