Vote
Bury
23
tl;dr!
I use GT and AppleScript to only display some work-related stuff when I'm at work. You can watch a video and check out the AppleScript I use here, on my website!




Weather:
Uses two scripts: Weather Icon Curl, and Weather Icon Display.
The "Weather Icon Curl" script curls a page from yahoo weather (I'm in Baltimore, but you just have to replace one URL in the script with the appropriate URL for your area to make it work)
I use this URL http://weather.yahoo.com/united-states/maryland/baltimore-2358820/, then the script will download the page, parse it for the icon used, and download that.

The "Weather Icon Display" script then displays the previously curl'd icon.

Weather Icon Curl: curl -o /tmp/weather.html http://weather.yahoo.com/united-states/maryland/baltimore-2358820/; curl -o /tmp/currenttemp.png `grep "div class="forecast-icon" style="background:url" /tmp/weather.html | awk -F"'" '{ printf $2 }'`
Weather Icon Display: Displays /tmp/currenttemp.png


Remote Office Ping
Uses a total of 6 scripts. One to display all of the office locations, and one script for each location's pings response time.

This is a bit more complex. I used one script ("Remote Office Labels") to display each remote office location. Then I used a separate script for each location's ping ("Remote Office Ping"). It pings a router in each office 10 times ever 5 minutes, averages the pings, and displays the average. The tricky part is that I only display this script when I'm on my work network.


Remote Office Labels: echo "Toronto:rDenver:rLos Angeles:rAmsterdam:rHong Kong:"
Remote Office Ping: HOST=*Remote IP*
ping -q -c 10 $HOST | grep "round-trip" |sed 's/// /g' | awk '{print $8}' | awk '{printf("%dn",$1 + 0.5);}'

Screenshots

Example:
Hosted by imgur.com


Setup:
Hosted by imgur.com

Geeklet file(s) to download

Remote Office Ping.glet
Remote Office Labels.glet
Weather icon curl.glet
Weather Icon Display.glet
Date.glet
Month.glet
Day.glet
Divider.glet

Either right-click and choose "Save Linked File As..." or hold the Option key and click to download files.
If using Safari, you may have to rename the files without the extra .txt extension that is added.
Geeklets are little bits of text, images or information that you can display on your desktop using the free GeekTool software.
Read more...
Advertisement

Advertise Here

Username:

Password:

Remember: