Randomly pick a wallpaper for your GNOME desktop, without any shell extensions.
| change-wallpaper.desktop | ||
| change-wallpaper.py | ||
| change-wallpaper.service | ||
| change-wallpaper.svg | ||
| change-wallpaper.timer | ||
| LICENSE | ||
| README.md | ||
Random Wallpaper for GNOME
A Python script to pick a random photo from the specified directory, set the wallpaper (for both light and dark) and the accent color.
Why does this exist
We'd like to change our wallpaper every 15 minutes and automatically set a pre-defined accent color for each photo. There are many GNOME Shell extensions out there that can do something similar, but we simply want to achieve the same effect without using any extensions, especially when upgrading to a pre-release GNOME version that many extensions don't support yet.
So instead of a GNOME Shell extension, we created a Python script that does everything via gsettings and hook it up to a systemd timer instead.
How to use
- Create a directory with desired photos and note its full path
- In that directory, append color codes to the files such as from
example.jpgtoexample-blue.jpg. Possible color codes areblue,teal,green,yellow,orange,red,pinkandpurple. If other colors are set or there is no color code at all, we'll set the color to neutralslate. - Put
change-wallpaper.pyto~/.local/binand make sure it is in your$PATH - In
change-wallpaper.servicereplace/path/to/diraccordingly. - Optionally, modify
change-wallpaper.timeras needed. The default is set to every 15 minutes. - Put
change-wallpaper.serviceandchange-wallpaper.timerin~/.config/systemd/user/and run these commands to get started
$ systemctl --user daemon-reload
$ systemctl --user enable --now change-wallpaper