Getting Xscreensaver Slideshows To Also Change Brightness With The Time Of Day

It’s only been a short while since I wrote daywall, a program that automagically chooses a wallpaper whose brightness is determined by the time of day it is.

I’ve made one tweak to the default brightness values — it was getting too bright before sunrise for me — but that’s something you can do with tweaking the script itself. I also added a switch to just run daywall, instead of re-checking the images and analyzing new ones on every run.

But the big thing I’d overlooked is my screensaver.

I use a photo slideshow screensaver. So the problem I’d been having with random wallpapers suddenly hit me in the face with my screensaver images as well.

So I hacked together a solution for that as well: daywall_for_xscreensaver.sh.

It was a little tougher than anticipated. Xscreensaver (and presumably its distro-specific forks as well) allow you to specify a directory of images to use for the screensaver. It’ll check the filenames of all those images when it first starts.

And then never check those filenames again.

So in order to dynamically change the wallpapers while xscreensaver is running, we have to specify a directory (it’s hardcoded in the script) and copy our files over into the same file names. The script not only calls daywall a number of times (9 by default ), but it also makes sure that it pulls nine distinct and separate files.

You can find daywall and daywall_for_xscreensaver.sh at GitHub, GitLab, or my personal git repository.

Photo by Zhyar Ibrahim on Unsplash

See also  Fixing Crossover Slowdown Caused By GTK3-nocsd (PEBCAK)

Leave a Reply

Your email address will not be published. Required fields are marked *