Created
February 17, 2017 10:55
-
-
Save thet/786af731423e757eff280abeeff1129f to your computer and use it in GitHub Desktop.
Live Earth Wallpaper Changer for Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Changes the wallpaper hourly and displays a projection of the earth with | |
# a semi-realistic rendered sunglight mapping. | |
# | |
# Via: http://www.webupd8.org/2009/09/real-time-earth-wallpaper-for-linux.html | |
# More Info: | |
# - https://www.die.net/earth/rectangular.html | |
# - https://www.die.net/earth/how.html | |
# | |
cd ~/Pictures/Wallpapers | |
while [ 1 ]; do | |
COUNTER=0 | |
while [ $COUNTER -lt 60 ]; do | |
wget http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg -O world.jpg | |
temp=$(stat -c%s world.jpg) | |
if [[ $temp > 1000 ]]; then | |
mv world_sunlight_wallpaper.jpg world-sunlight-archive/world_sunlight_wallpaper-$(date +%F-%T).jpg | |
mv world.jpg world_sunlight_wallpaper.jpg | |
break | |
fi | |
sleep 5 | |
let COUNTER=COUNTER+1 | |
done | |
sleep 3600 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment