|
1 year ago | |
---|---|---|
inkscape-originals | 1 year ago | |
wallpapers | 1 year ago | |
LICENSE | 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.
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.
background-weather.sh -f mybackground.png
-w
Weather
Checks for the named weather directory inside the wallpapers folder.
background-weather.sh -w snowing
-l
Latitude & Longitude
Unimplemented. This will affect the daylight hours expressed in the backgrounds.
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.
background-weather.sh --test
The wallpapers all go in the wallpaper directory, so a valid path culd be:
./wallpapers/$season/$weather/$file
For example:
./wallpapers/winter/snowing/03-Late-Morning.png
Or:
./wallpapers/winter/03-Late-Morning.png
Or the default:
./wallpapers/03-Late-Morning.png
The available scripted paths are:
spring
fall
summer
winter
clear
(default)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.