Operations 6 min read

Automate Hourly Linux Wallpaper Changes with styli.sh

This guide explains how to install the styli.sh shell script, configure it for various Linux desktop environments, and use cron to automatically fetch and set a new Reddit‑sourced wallpaper every hour, while offering numerous customization options such as size, search terms, and display tools.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Automate Hourly Linux Wallpaper Changes with styli.sh

The styli.sh script is a lightweight shell utility that downloads popular wallpapers from Reddit and sets them as your Linux desktop background. It works with GNOME, KDE Plasma, Xfce, and the Sway window manager, and can be scheduled with cron for hourly updates.

Installation

Open a terminal, install the required tools ( git and feh), then clone the repository and enter its directory:

git clone https://github.com/thevinter/styli.sh
cd styli.sh

Running the script manually

Select the appropriate command for your desktop environment:

GNOME: ./styli.sh -g Xfce: ./styli.sh -x KDE Plasma: ./styli.sh -k Sway:

./styli.sh -y

Scheduling hourly changes

Edit your crontab and add an entry that runs the script every hour (replace /path/to/styli.sh with the actual path):

crontab -e
@hourly /path/to/styli.sh

Subreddit configuration

The repository includes a subreddits file containing a list of default subreddits. To add more sources, simply append additional subreddit names to the end of this file.

Additional configuration options

You can control wallpaper dimensions, search terms, and the method used to set the background:

Random 1920×1080 wallpaper: ./styli.sh Specify width and height: ./styli.sh -w 1080 -h 720 Search by keyword: ./styli.sh -s island or ./styli.sh -s "sea sunset" Fetch from a specific subreddit (e.g., reddit): ./styli.sh -l reddit Use a custom subreddit list: ./styli.sh -r or ./styli.sh -r wallpaperdump Set background with feh: ./styli.sh -b or ./styli.sh -b bg-scale -r widescreen-wallpaper Add custom feh flags: ./styli.sh -c or ./styli.sh -c --no-xinerama -r widescreen-wallpaper Automatically adjust terminal colors: ./styli.sh -p Use nitrogen instead of feh: ./styli.sh -n Update multiple screens with nitrogen: ./styli.sh -n -m Choose a random image from a local directory:

./styli.sh -d /path/to/dir

Final notes

The script is small, memory‑efficient, and can retrieve a new image within any chosen interval, keeping your desktop fresh. If you dislike a particular wallpaper, simply rerun the script to select another one.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxcronDesktop AutomationWallpaperstyli.sh
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.