Change your Linux Desktop Wallpaper Every Hour [Here’s How]

2 min


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.

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.

Change your Linux Desktop Wallpaper Every Hour using styli.sh
Change your Linux Desktop Wallpaper Every Hour using styli.sh

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.sh

To specify a desired width or height
./styli.sh -w 1080 -h 720
./styli.sh -w 2560
./styli.sh -h 1440

To set a wallpaper based on a search term
./styli.sh -s island
./styli.sh -s “sea sunset”
./styli.sh -s sea -w 1080

To get a random wallpaper from one of the set subreddits
NOTE: The width/height/search parameters DON’T work with reddit
./styli.sh -l reddit

To get a random wallpaper from a custom subreddit
./styli.sh -r
./styli.sh -r wallpaperdump

To use the builtin feh –bg options
./styli.sh -b
./styli.sh -b bg-scale -r widescreen-wallpaper

To add custom feh flags
./styli.sh -c
./styli.sh -c –no-xinerama -r widescreen-wallpaper

To automatically set the terminal colors
./styli.sh -p

To use nitrogen instead of feh
./styli.sh -n

To update > 1 screens using nitrogen
./styli.sh -n -m

Choose 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.

SEE ALSO:   Auto Change Wallpaper Everyday via Variety in Ubuntu/Linux

Do you like this script? Or do you know anything like this for wallpaper switcher? Let me know in the comment box below.


We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Also Read


Like it? Share with your friends!

Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

4 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
4
0
Would love your thoughts, please comment.x
()
x