I wanted to take the parts of GeekTool and this lifehacker column on taking gCal and displaying it on your macintosh desktop which is fully documented by Devan Goldstein though I admit that he uses some tricks I’d rather avoid.

LifeHacker had a decent writeup on taking your gcal and grabbing it via some perl and shell foo then using GeekTool to display the resulting formatted text file on your computer desktop. The actual meat of the work was done by Devan Goldstein though his discussion and methods aren’t something I’m necessarily ‘ok’ with and quite long. I’ll try to make it here in a much shorter format and use cron instead of launchd.

Initially a few software/things will be required:

  • some perl modules - XML::Simple, Date::Parse, Data::Dumper (installed via perl -MCPAN -e shell)
  • curl
  • perl

To get the feed data you’ll have to grab the calendar private URL from gcal:
Calendar settings -> calendars -> select-your-cal -> click-on-private-xml-url -> copy link

Then save that away in a txt file for your use later. I like cron for repeating tasks, Devan says it may be deprecated and going away past 10.4 I’ll check my 10.5 machine later and see if this will last past an upgrade. We’ll use cron and curl to grab the URL and save that in a file for later processing.

the crontab entry looks like:

*/10 * * * * /usr/bin/curl -f -s {private xml url} -o {destination for .gcalfeed.xml} > /tmp/gcal-feed.log 2>&1

Now that the data will get pulled down each 10 minutes we can use Devan’s perl-foo to massage that into something geektool will display. I believe I made some changes to this script at home, I’ll find those and post a diff so that others can benefit from whatever changes I made.

Now, make GeekTooldo it’s magic running the script every 10 mins and displaying that out on your desktop: