Note: If you have your Google Calendar synced to iCal via CalDAV, then this Geeklet that uses iCalBuddy is a much easier option. If you'd rather not use iCal at all, then read on...
There is a command line application called gcalcli
that allows you to access your Google Calendar from the Terminal or from GeekTool. It is a bit complicated to install though.
Installation instructions:
- Download the latest gdata python client
- Double-click the file to un-zip
- Open Terminal
- Type
cd
followed by a space, then drag thegdata-#.#.#
folder onto the window. - Press return
- Type
./setup.py install
and press return. - You can now delete the gdata folder and zip file
- Download the latest version of gcalcli
- Double-click the file to un-zip
- Open the file in TextEdit by dragging onto the TextEdit icon
- Change the first line to
#!/usr/bin/python -W ignore::DeprecationWarning
- Save the file
- In Finder choose "Go to Folder…" from the Go menu
- Type in
/usr/local/bin/
- Drag gcalcli to this folder (Enter admin password if needed)
In TextEdit create a new text file with the following three lines:
[gcalcli] user: **username** pw: **password**
Choose "Make Plain Text" from the Format menu
- Save as
.gcalclirc
in you user home folder.
There are lots of different options for gcalcli. Detailed usage instructions are here.
Some example commands you can use in Terminal or GeekTool:
/usr/local/bin/gcalcli --width=15 calw 2
/usr/local/bin/gcalcli agenda
/usr/local/bin/gcalcli --cals=owner calm
/usr/local/bin/gcalcli agenda '11/26/2009' '11/30/2009'
Useful options:
calw 3
displays a calendar of the next three weeks
calm
displays a calendar of this month
agenda '11/26/2009' '11/30/2009'
displays a list of events from the 26th to the 30th
--nc
for no colour (the default colours look pretty horrible in GeekTool)
--cals=owner
for only the calendars you own (to remove subscriptions)
--width=20
for wider columns (useful for GeekTool on a wide screen)
The Geeklet files attached have the following commands:
/usr/local/bin/gcalcli --nc --width=25 calw 3
/usr/local/bin/gcalcli --nc agenda