This shell script styli.sh helps to change your Linux desktop wallpaper in every hour automatically and with several options.
A nice wallpaper to start your day with, your desktop is refreshing. But it is very cumbersome to find wallpaper, then saving and eventually set as wallpaper. All these steps can be done by this script called styli.sh.
Table of Contents
styli.sh – Change your Linux Desktop Wallpaper Every Hour
This is a shell script which you can download from GitHub. When runs, it fetches the wallpapers from popular Subreddits from Reddit and set it as your wallpaper.
This script works with all popular desktop environments such as GNOME, KDE Plasma, Xfce and Sway window manager.
It is loaded with features, and you can run the script with via crontab in every and get a fresh wallpaper in a specific interval.
Download and Install, Run
Open a terminal and clone the GitHub repo. You need to install feh and git if not installed.
git clone https://github.com/thevinter/styli.sh
cd styli.sh
To set a random wallpaper, run below as per your desktop environment.
GNOME
./styli.sh -g
Xfce
./styli.sh -x
KDE Plasma
./styli.sh -k
Sway
./styli.sh -y
Change every hour
To change background every hour, run the following command –
crontab -e
And add the following to the opened file. Don’t forget to change the script path.
@hourly script/path/styli.sh
Change the subreddits
In the source directory, there is a file called subreddits. It is filled up with some standard subreddits. If you want some more, just add the Subreddit names at the end of the file.
More Config options
The types of wallpapers, size, can also be set. These are some unique configuration option of this script.
To set a random 1920×1080 background
./styli.shTo specify a desired width or height
./styli.sh -w 1080 -h 720
./styli.sh -w 2560
./styli.sh -h 1440To set a wallpaper based on a search term
./styli.sh -s island
./styli.sh -s “sea sunset”
./styli.sh -s sea -w 1080To get a random wallpaper from one of the set subreddits
NOTE: The width/height/search parameters DON’T work with reddit
./styli.sh -l redditTo get a random wallpaper from a custom subreddit
./styli.sh -r
./styli.sh -r wallpaperdumpTo use the builtin feh –bg options
./styli.sh -b
./styli.sh -b bg-scale -r widescreen-wallpaperTo add custom feh flags
./styli.sh -c
./styli.sh -c –no-xinerama -r widescreen-wallpaperTo automatically set the terminal colors
./styli.sh -pTo use nitrogen instead of feh
./styli.sh -nTo update > 1 screens using nitrogen
./styli.sh -n -mChoose a random background from a directory
./styli.sh -d /path/to/dir
Closing Notes
A unique and handy script, low on memory and can directly fetch images in an interval – like an hour. And make your desktop look fresh and productive all the time. If you do not like the wallpaper, you can simply run the script from the terminal again to cycle through.
Do you like this script? Or do you know anything like this for wallpaper switcher? Let me know in the comment box below.