Here is a simple tutorial on getting your Google Calendar on Conky.
Google calendar is a very useful due to it's accessibility, while Conky is great way to display information in subtle manner.
GCalcli is a command line tool that lets you access your Google Calendar in a terminal.
http://code.google.com/p/gcalcli/
Thankfully it was added to the repositories in Hardy.
Step One GCalcli
To install gcalcli
Then in your home folder you need to create a config file with your Google Calendar logins. Create the file by running this command:Code:sudo apt-get install gcalcli
Then in text file enter your Google Calendar username & password in this format. Note in the username in don't include the "@gmail.com" part.Code:gedit ~/.gcalclirc
If you want to test it enter this command in a terminalCode:[gcalcli] user: yourusername pw: yourpassword
It should list an agenda from your calendar for the next five daysCode:gcalcli --nc agenda
You need to create the script file below to update the file with your Google Calendar data.
In the script you need to set 1 variable, the file path to the text file that will hold the calendar data.
Edit: This post explains how to get your agenda for the next 2 monthsCode:#!/bin/bash gcalcli --nc agenda | tee /pathToTextFile/gcal.txt
http://ubuntuforums.org/showpost.php...9&postcount=45
You need to cut and past the above code into a file called gcal.sh.
Then you can run the script in a terminal by
Note. Gcalcli provides many other outputs including a calendar like output. You can read about it here:Code:bash /pathtoFolder/gcal.sh
http://code.google.com/p/gcalcli/wiki/HowTo
If you want you can get the script to run every X minutes by editing your cron. I don't want to go into this . This thread deals Cron comprehensively
http://ubuntuforums.org/showthread.php?t=102626
Step Two Conky
To get the Google Calendar data in your Conky, edit your config file.
Then find the word "TEXT" in it, below it you can add the following lineCode:gedit .conkyrc
Note. 10 is the number of lines from the top of text file. You also need to increase your text buffer if you planning to read many lines by editing the following lines.Code:${head /pathToTextFile/gcal.txt 10 20}
Code:# Maximum size of buffer for user text, i.e. below TEXT line.default is 16384 bytes max_user_text 32768
That's it. I have attached a small example of how it can look like.
This was tested on the Gcalci & Conky that came with Hardy 8.04
You can also find my Conky & Tomboy tutorial here:
http://ubuntuforums.org/showthread.php?t=805211
Bookmarks