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.
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.shRunning 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 -yScheduling 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.shSubreddit 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/dirFinal 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
