A bash script that changes the desktop background every x amount of hours. And can detect climate conditions, to match the weather.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Patxi Pierce 304d7f81fb 乁 Ɵ͆ ل͜ Ɵ͆ ㄏ 1 year ago
inkscape-originals 乁 Ɵ͆ ل͜ Ɵ͆ ㄏ 1 year ago
wallpapers 乁 Ɵ͆ ل͜ Ɵ͆ ㄏ 1 year ago
LICENSE Initial commit 1 year ago
README.md ¯\_(ツ)_/¯ 1 year ago
background-weather.sh 乁 Ɵ͆ ل͜ Ɵ͆ ㄏ 1 year ago



A bash script that changes the desktop background to adjust to time and season.


  • Detect climate conditions, to match the weather.
  • Get wallpapers for all seasons.
  • Use timezone to add make night or day longer.
  • Detect environment type, (only tested in raspbian).
  • Make default SVG files (started)


Ideally you just clone this repo and make a link to your bin directory.

git clone https://git.patxipierce.com/pxi/background-weather.git
ln -s ./background-weather/background-weather.sh /home/$USER/bin/

Then setup a cron job:

crontab -e

And add the following to update every hour:

0 * * * * /home/$USER/bin/background-weather.sh


Since the addition of parameters such as -w you can input the weather to influence the outcome of the wallpaper.

-f File

Override the file, but still apply season, weather, etc.

  • Default: null
  • E.g background-weather.sh -f mybackground.png

-w Weather

Checks for the named weather directory inside the wallpapers folder.

  • Default: clear
  • E.g background-weather.sh -w snowing

-l Latitude & Longitude

Unimplemented. This will affect the daylight hours expressed in the backgrounds.

  • Default: 0
  • E.g background-weather.sh -l 15.23456,-30.67890

--test Test mode

Returns the path to the existing file. Useful for implementing the script for other distros.

  • Default: false
  • E.g. background-weather.sh --test


The wallpapers all go in the wallpaper directory, so a valid path culd be:


For example:




Or the default:


The available scripted paths are:

  • Season
    • spring
    • fall
    • summer
    • winter
  • Weather condition
    • clear (default)
  • Filename (which can be):
    • 01-Early-Morning.png
    • 02-Mid-Morning.png
    • 03-Late-Morning.png
    • 04-Early-Afternoon.png
    • 05-Mid-Afternoon.png
    • 06-Late-Afternoon.png
    • 07-Early-Evening.png
    • 08-Mid-Evening.png
    • 09-Late-Evening.png
    • 10-Early-Night.png
    • 11-Mid-Night.png
    • 12-Late-Night.png


Default wallpapers are from 8-bit Day.