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