Results 1 to 10 of 35

Thread: Get Tomboy Notes into Conky

Hybrid View

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

    Get Tomboy Notes into Conky

    I know all of most of you use Conky to remind yourself, about your cpu specs
    Anyway here is simple tutorial on getting your Tomboy notes into Conky.

    Tomboy is great for jotting down notes, but I don't like to have it open when I am not using. While Conky is perfect for displaying information in a subtle manner.

    This Tutorial attempts to take advantage of this, using the awesome D-Bus interface.
    This neat tutorial on Arstechnica was of great help.
    http://arstechnica.com/journals/linu...-bus-interface

    Step One Tomboy
    I have a note in Tomboy called "Tasks" where I will note down tasks and important reminders. You can use any note in Tomboy for this tutorial.
    I was able to write a simple python script (my first python script ) to extract this Tomboy note to a text file. In the script you need to set 2 variables, the name of theTomboy note and the file path to the export text file.
    Code:
    #!/usr/bin/env python
    import sys, dbus, gobject, dbus.glib
    
    #Varibale you need to assign values to
    noteName = "Tasks"  #enter the name of your tomboy note
    exportFileName = '/home/myhomefolder/journal/tasks.txt' # the export file
    
    #Read the tomboy note
    bus = dbus.SessionBus()
    obj = bus.get_object("org.gnome.Tomboy", "/org/gnome/Tomboy/RemoteControl")
    tomboy = dbus.Interface(obj, "org.gnome.Tomboy.RemoteControl")
    
    note = tomboy.GetNoteContents(tomboy.FindNote(noteName))
    
    #export the note
    file = open(exportFileName, 'w')
    file.write(note)  # write the file
    file.close() # close it
    You need to cut and past the above code into a file called exportTomboyNote.py in a folder.

    Then you can run the script in a terminal by
    Code:
    python /pathtoFolder/ exportTomboyNote.py
    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 note 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 /pathToexportFile/tasks.txt 30 20}
    Note. 30 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.

    This was tested on the Tomboy & Conky that came with Hardy 8.04

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

    Re: Get Tomboy Notes into Conky

    Wow, didn't realise this got approved.

    Sadly no one found it useful

  3. #3
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: Get Tomboy Notes into Conky

    This is great, thanks! Now I'm trying to get todays appointments from evolution calendar / google ical into conky.

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

    Re: Get Tomboy Notes into Conky

    Quote Originally Posted by Mandrake12 View Post
    This is great, thanks! Now I'm trying to get todays appointments from evolution calendar / google ical into conky.
    Thanks

    I will post a Tutorial in getting you calendar items from Google Calendar into Conky using gcalcli (it's in the repos) soon.

    http://code.google.com/p/gcalcli/

    I have submitted the thread I will msg you when it gets approved.
    Last edited by pt123; June 4th, 2008 at 11:45 AM.

  5. #5
    Join Date
    May 2005
    Beans
    96

    Re: Get Tomboy Notes into Conky

    Well, thanks for the tomboy script, but please let me know for the Google Calendar I am more than interested!

  6. #6
    Join Date
    May 2005
    Beans
    96

    Re: Get Tomboy Notes into Conky

    Well, while we are talking about Tomboy in Conky, It will be nice for the scripts to fetch the layout and also the font (bold/underline/etc etc)

    Thanks,

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
  •