Skip to content

Instantly share code, notes, and snippets.

@vrybas
Created March 15, 2010 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrybas/332482 to your computer and use it in GitHub Desktop.
Save vrybas/332482 to your computer and use it in GitHub Desktop.
# Original script is taken from http://www.omgubuntu.co.uk/2009/09/real-earth-wallpaper-linux.html
# It downloads World Sunlight Map every hour, and you could use it as wallpaper.
# I've added ImageMagick line to put your city on the map. Just change 'convert' parameters:
# '-size' - to set screen size
# '-annotate' - to set city name(two times)
# '-geometry' - to set your city position on the map
# Add to autostart and set your wallpaper to ~/world_sunlight_Wallpaper.jpg
# requires wget and ImageMagick
#!/bin/bash
cd
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
convert -pointsize 20 -size 1280x800 xc:none -gravity center -stroke black -strokewidth 2 -annotate 0 '* Omsk' -background none -shadow 400x3+0+0 +repage -stroke none -fill white -annotate 0 '* Omsk' world.jpg +swap -gravity south -geometry +310+290 -composite world_sunlight_Wallpaper.jpg
rm world.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