Python 3 made this whole thing way better. I have a stable function for advancing up and down the list of backgrounds, and this works in all supported desktop environments now! rWall 3.0 supports Cinnamon 2, GNOME 3, Mate, KDE 4-5, Xfce 4.10, and Openbox, as well as a number of other window managers (as long as they can use feh's background tools).
This may look like a large script for just a wallpaper randomizer, but it does a lot, actually:
- * auto-detects supported desktop environments
* commandline options for up to five user-preset image directories
* default directory setting
* picks a random background from a commandline-supplied directory
* cycles alphabetically through an image list of the last used directory
* loops through backgrounds in a commandline-supplied directory
Code: Select all
sudo apt-get install wmctrl feh
Code: Select all
chmod +x rwall.py
A note for Xfce, KDE, and Openbox users: UPDATE: Xfce is now automated; thanks, Peter Levi! KDE users just need to run the script once and change their desktop settings to slideshow and point to the [home]/.config/rwall/kde/mon1 folder. Openbox users must have feh installed, and have the line
Code: Select all
. $HOME/.fehbg &
The only thing missing are the two or three GTK dialog boxes I had in the old version. While it's possible that I'll add those in the future, the real beauty of this script is in using shortcuts, not dialogs. Thanks for your time, and I welcome constructive criticism!