This simple program is being developed with the idea of making a daemon that could change the wallpaper automatically.
The main file in this repo is carousel.sh
.
The config.json
file only contains the directory of the wallpapers.
In order to make this script run automatically a cron
job must be set up.
There are a lot tutorials online, but in a nutshell:
- Run
crontab -e -u your_username
- Add a new rule like
*/10 * * * * /path/to/repo/carousel.sh >/dev/null 2>&1
- Save and exit
This rule executes the script once every 10 minutes. For more detailed information about crontab timing go check out this (amazing and simple) website.
Clone the repo in the bin
folder or in the folders you keep for custom scripts so that you don't have it laying around.
It is important that all files do not contain any spaces.
In this stackoverflow answer it's explained why gsettings
does not play well with cron
and crontab
.
The latest iteration of this script keeps in consideration the picture-uri-dark
option in gsettings
in Ubuntu 22.04.