Skip navigation.

rantshoutwhisper

Displaying iCal events in Conky WITHOUT Google Calendar

, , ,

Conky is used to write various bits of information to your desktop/workspace. It has lots of scripts written for it which will display weather, news and a whole lot more...

...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.

XTerm: copying to the clipboard an easy way Fluxbox: The Deco Bitmask Mystery Solved!

Comments

Anonymous 2. March 2009, 21:28

Chris writes:

Many thanks for the calcurse + conky tip,great aid for my poor memory!.

987poiuytrewq 9. March 2009, 14:13

Hi there, many thanks for the calcurse tip. I was playing around with this and I figured out how to get it to read your Evolution calendar, and do some formatting (I still can't figure out how to get bold or colours etc). Just create a shell script, (and make it executable) with the following in it, and then set the conky command to be

${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

That's brilliant! I don't use Evolution but the script looks very handy. Thanks!

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

Download Opera, the fastest and most secure browser