How to create rotating wallpapers in Gnome

Few days ago I found artwork suggestions for Fedora 10. I really like the wallpapers in Solar theme. They should change based on the time of the day. As I don’t think that is supported in Gnome, I wrote this little script that does the job.

To run it, a directory with wallpapers needs to be passed.

./rotate-wallpapers /path/to/wallpaper/directory/

If you want it to run in the background, you can press Alt+F2 in Gnome, and run it.

/path/to/rotate-wallpapers /path/to/wallpaper/directory/

Once it’s run, it will count the number of wallpapers in the directory (files ending in jpg, jpeg, gif, png or svg), divide 1440 by that number and use the result as a period of time on which wallpapers will be rotated. It will set the first wallpaper, and sleep until the wallpaper needs to be changed.

So, this script is pretty much specific. It will work best with the series of wallpapers that have subtle changes, such as the Solar wallpapers. But, you’re free to use it in every way you want. Good luck :)…

If you find any bugs, please post it in the comments. Thanks.

Tags: , , , , , ,