setting up geeklets on Mac OS X

GeekTool is an application for Mac OS X (Snow Leopard onwards), which lets you display various kinds of information on your desktop via 3 default plug-ins.

geektool

Similar desktop customization tool are available for Ubuntu (Conky) and Windows (Rainmeter)

You can install GeekTool from AppStore and then create your own geeklets or get them from internet. In this post I am putting up some very basic geeklets but that is all I want. Too much information tends to be distracting.

I have added 3 shell-geeklets to report time, date and weather. Since these are shell geeklets they use well-published commands and tools.

To add time and date command is:
<br /> date +"%H:%M"<br /> date '+%A, %b %d'<br />
geeklets-time

It gets interesting to add weather. Basic idea is to query yahoo for weather information and then parse current conditions. Replace YOURCITYCODE in below code with your zipcode (US only)
<br /> curl —silent "http://xml.weather.yahoo.com/forecastrss?p=YOURCITYCODE&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'<br />
The output is:
geeklet