conky for my desktop
At work I have a todo list that I maintain in a simple text file on my system. This todo list looks create and is readable on the command line (using cat) and in vim. However, I was really wanting it in a place where I could see it at a glance.
Also sometimes I miss the Ubuntu notifications in the top right corner of the screen (my background is black and the notifications don’t stand out on a black background since they are also black (I can’t wait until we can easily customize the notification system theme, anyone know how to do that yet?)).>
Another item of information that I love to have visible at all times is the list of my co-workers who are currently online (logged into IM). This helps if I need to ask one of them a quick question.
The solution: Conky
At first conky may scare you, I know it did me. The configuration files have a little bit of a learning curve that may be too steep for some. Conky is mainly used as a “light weight system monitor”. I however don’t need a system monitor (I’ve never really used the information they provide while I am on my desktop computer). System monitors are great for a laptop where I need to worry about what processes might be cramping my speed or draining my battery. I might also use the system monitor to check the temperature of my laptop or the battery level. For my desktop however I don’t need (or want) that stuff. Thankfully conky is so much more than a “light weight system monitor” I can set up scripts to run at any interval I would like and display the output in a nice way in a place where I can (almost) always see it.
Here is my conky configuration file:
background yes
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
text_buffer_size 1024
use_xft yes
xftfont Inconsolata:size=12
#xftfont Angleterre Book:size=10
alignment top_right
gap_x 20
gap_y 20
maximum_width 400
TEXT
${font Cash Font:bold:size=12}${color #444}TODO: ${hr 7}
${font}${color gray}${execpi 60 /home/chansen4/conkyTodo.py work}
${font Cash Font:bold:size=12}${color #444}NOTIFICATIONS: ${hr 7}
${font}${color gray}${execpi 10 /home/chansen4/bin/getLastNotify.py}
${font Cash Font:bold:size=12}${color #444}PEEPS: ${hr 7}
${execpi 10 conkyPidgin -I co-workers -C C -W U -A A -o -t ~/conkyPidgin.template}
Everything after the “TEXT” is what is displayed (before that are just settings). If you want to change some setting or another you start with the $ (dollar sign) and in {} (curly braces) afterwards specify the property to change and the value to be set.
For example: ${font Cash Font:bold:size=12} sets the font to be the “Cash Font” font, makes it bold and sets the size to 12 point. ${color #444} sets the color to be hex 444. ${hr 7} creates a horizontal rule of 7 pixels thick.
The real interesting part though are the ${execpi commands (the format for these commands is ${execpi [RUN TIME IN SEC] [SCRIPT], not too difficult). This will run an executable script and parse the output at more conky configuration code. There are three such calls in my configuration file. conkyTodo.py (my own script to parse my todo list and display it nicely in conky), getLastNotify.py (once again, my own script to parse the notify-osd.log file to get the last 4 notification messages and display them nicely in conky), and conkyPidgin (which is part of the conky hardcore package and gives one access to the Pidgin contacts).
If any of this is too confusing or you would like some more information/clarification just leave a comment and I will do my best to answer your questions. Thanks!
Update: Here is my getLastNotify.py script.


