Displaying iCal events in Conky WITHOUT Google Calendar
Wednesday, 14. January 2009, 05:46:33
...except iCalendar events from a local file. There is a workaround by signing up to Google Calendar and downloading any of the various scripts; but I can't really see the point in signing up to a calendaring service when you have a calendar already.
So I found a simple, crude way of getting what I want. I can't format it [and perhaps someone can help with that?] but at least it works. Simply get Calcurse and import your iCal file into it [you have to run Calcurse from a terminal]. Then go to your .conkyrc file and add
${execi 3600 calcurse -a -r 7}
Under the TEXT section. This will display your appointments for the next seven days. You can find other options by reading the Calcurse documentation, which is well-written.









Anonymous # 2. March 2009, 21:28
Many thanks for the calcurse + conky tip,great aid for my poor memory!.
987poiuytrewq # 9. March 2009, 14:13
${execi 1 ~/path/to/script}
If you set the update interval to 1 and also the conky update interval to one, you will get "live" updates to any changes made in Evolution. Here's the script:
#! /bin/bash
rm ~/.calcurse/apts
calcurse -i ~/.evolution/calendar/local/system/calendar.ics | sed 's/.*//'
today=$(date +%D | sed 's/\//\\\//g')
tomorrow=$(date -d tomorrow +%D| sed 's/\//\\\//g')
twodays=$(date -d "2 days" +%D| sed 's/\//\\\//g')
twodaysname=`date -d "2 days" +%A`
echo
echo
calcurse -r 4 | sed -e 's/-.//' -e 's/*.//' -e 's/^\ //' -e 's/->.*//' -e 's/\ \ //' -e 's/\n//' -e '/^$/ d' -e '/\ $/ {
N
s/\n//
}' | sed -e 's/'$today':/--Today------------/' -e 's/'$tomorrow':/\n--Tomorrow------/' -e 's/'$twodays':/\n--'$twodaysname'---/'
The command sed does search and replace on the output of calcurses. I'm sure you can figure out how to add the names for more than 3 days in the future etc.
Run conky and see the lovely output!
Corey Mwamba # 26. March 2009, 08:28