But let your communication be Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil
Wednesday, July 7th, 2010

A living desktop for Snow Leopard

There are certainly a zillion ways how to do create a nice background for your Mac. Here is my favorite method of a weather forecast, an individual calendar and the most recent emails. I created just three geeklets and loaded them in Geektool.


The most difficult part turned out to get the weather icon from Yahoo! With a little help form several sites I ended up with the following code for Munich

curl –silent “http://weather.yahoo.com/germany/bavaria/munich-676757/” | grep “forecast-icon”| sed “s/.*background\:url(\’\(.*\)\’)\;\ _background.*/\1/” | xargs curl –silent –output “/Users/wjst/Documents/Daten/System/yweather.png”
curl –silent “http://xml.weather.yahoo.com/forecastrss?p=GMXX0087&u=c” | grep -E ‘ curl --silent "http://xml.weather.yahoo.com/forecastrss?p=GMXX0087&u=c" | grep -E '//’ -e s’/\”//g’ -e s’/ / /g’
curl –silent “http://xml.weather.yahoo.com/forecastrss?p=GMXX0087&u=c” | grep -E ‘//’ -e s’/\”//g’ -e s’/ / /g’ -e ‘s/date=//’ -e ‘s/text=//g’ -e ‘s/ code=3.//g’

while the picture is simply loaded from /Users/wjst/Documents/Daten/System/yweather.png.
For the ical bridge I installed icalbuddy

/usr/local/bin/icalBuddy -nc -sd -ic Todo -b “” -li 3 -stda uncompletedTasks | sed -e “s/!//” -e ‘s/^ //g’
echo ” ”
/usr/local/bin/icalBuddy -nc -sd -ic Out,Base -df %a” “%d.%m.%Y -nrd -b “” -iep datetime,title -eed -po datetime,title -ps “| | – |” eventsToday+6 | sed -e “s/*/Geburtstag */” | sed -e “s/!/!!/”

while emails are pulled by a short appescript that I found at macosxhints.com

osascript /Users/wjst/Documents/Daten/System/NoNewMail.scpt| sed -e “s/\///” | sed -e “s/\”//”

Related Posts: The art of a clean Mac OS X desktop, Rural protection or urban living, No proof of hygiene hypothesis, Do what you will this life’s a fiction and is made up of contradiction
Categories: Computer + Software,Joke + Fun
Keywords: ,
Trackback: http://www.wjst.de/blog/blog/2010/07/07/a-living-desktop-for-snow-leopard/


Comments are closed.