Results 1 to 10 of 108

Thread: Google Calendar into Conky

Threaded View

  1. #1
    Join Date
    Jul 2005
    Beans
    740
    Distro
    Ubuntu 12.04 Precise Pangolin

    Google Calendar into Conky

    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
    Code:
    sudo apt-get 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:
    gedit ~/.gcalclirc
    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:
    [gcalcli]
    user: yourusername
    pw: yourpassword
    If you want to test it enter this command in a terminal
    Code:
    gcalcli --nc agenda
    It should list an agenda from your calendar for the next five days

    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.


    Code:
    #!/bin/bash
    gcalcli --nc agenda | tee /pathToTextFile/gcal.txt
    Edit: This post explains how to get your agenda for the next 2 months
    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
    Code:
    bash /pathtoFolder/gcal.sh
    Note. Gcalcli provides many other outputs including a calendar like output. You can read about it here:
    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.
    Code:
    gedit .conkyrc
    Then find the word "TEXT" in it, below it you can add the following line
    Code:
    ${head /pathToTextFile/gcal.txt 10 20}
    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:
    # 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
    Attached Images Attached Images
    Last edited by pt123; May 6th, 2012 at 08:03 PM. Reason: username for gmail, next 2 months

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •