Friday, 23 May 2008

Desktop Weather

Add a simple script to /etc/cron.hourly and you have an updated weather map (in this case the Irish rain radar map) which you can stretch to any size you need on the desktop.

#!/bin/bash
wget -qmnd http://www.met.ie/weathermaps/latest_radar.gif -O /home/ian/Desktop/weather.gif

Or even better, if you've installed imagemagick, combine the latest radar with your wallpaper automatically. Set your wallpaper to radar.jpg.

#!/bin/bash
wallpapers="/usr/share/backgrounds/"
wallpaper="simple-ubuntu.png"
weather="http://www.met.ie/weathermaps/latest_radar.gif"

convert -page +0+0 $wallpapers$wallpaper -page +400+400 $weather -flatten $wallpapers/radar.jpg

0 comments:

iantheteacher

Planet ILUG