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

2 min

This shell script 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 – 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

To set a random wallpaper, run below as per your desktop environment.

Change your Linux Desktop Wallpaper Every Hour using
Change your Linux Desktop Wallpaper Every Hour using


./ -g


./ -x

KDE Plasma

./ -k


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

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

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

To set a wallpaper based on a search term
./ -s island
./ -s “sea sunset”
./ -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
./ -l reddit

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

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

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

To automatically set the terminal colors
./ -p

To use nitrogen instead of feh
./ -n

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

Choose a random background from a directory
./ -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.


Creator and author of Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Notify of

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

Oldest Most Voted
Inline Feedbacks
View all comments