Q & A with Conky’s Main Dev, Brenden Matthews
I've been working with Conky now for the better part of a year, which, I'll admit, makes me a bit of a latecomer to this game! This was my first ever screenshot, and my first foray into the wonder that is desktop customisation with Conky:
![]() |
| From Screenshots |
If you know me at all, I think you'd agree that I have since fallen deep in love with Conky, so when Conky's main developer, Brenden Matthews, agreed to answer a few questions for me, I jumped at the chance!
Q: How did Conky get started? I know that it was a "fork of Torsmo", but I'm not too familiar with Torsmo. Were you originally involved in that project? And if not, how did you come to inherit it and move it on to become Conky?
Brenden Matthews: Conky started when I created a patch for torsmo (to add data smoothing, i.e. sample averaging such as cpu_avg_samples) and received no feedback after submitting it. I also noticed a lack of activity with the project in general, and impulsively decided to fork the project. In some ways Conky hasn't changed much since torsmo, but it has evolved to something much more rich and more capable.
Q: How did you decide on the name Conky? I know it's named after that doll on Trailer Park Boys, but is that it, it just sounded cool? Or does it hold some special significance to you?
BM: I've been a big fan of the TV show for many years, and Conky was one of my favourite characters.
Q: How many developers are there now, and where are they located?
BM: There are a huge number of contributors to Conky. Many of them are one-off contributors, but the majority of the work is done by people who make regular contributions (and have done so for years). I don't want to list off anyone in particular for fear of leaving someone out, but if anyone is curious you can always check the git log (at http://git.omp.am/?p=conky.git;a=shortlog).
Q: How do you decide which features to add to Conky (e.g. an $rss variable as opposed to just letting people use $exec curl)?
BM: Things just sort of evolve. Usually I don't write many new features myself, as I have long since added all the stuff I had a personal interest in. Most of the work I do now is bug fixes and adding new patches (which usually requires a bit of tweaking). Often people submit patches which either duplicate efforts or are very similar to existing components, so I have to separate the parts that I want from those I don't.
For example, with the $curl object, we already had RSS support (which used curl) and later somebody added weather support (which also used curl). So, I refactored the code so that the curl, RSS, and weather parts were all separate components, and thus wound up with the $curl object.
Q: Which is your favourite feature in Conky?
BM: I really like the built in IMAP client with IDLE support. It's also probably one of the most under-utilized features of Conky (though I admit it can be tricky to set up). Then again, I might be biased, since I wrote all that code.
For a little background, see http://en.wikipedia.org/wiki/IMAP_IDLE
Q: What does the future of Conky look like? Or perhaps, what can we look forward to in Conky 2.0?
BM: Good question. There are some things about Conky I want to stay as they are, but some things need to change. For example, the current conkyrc syntax has to go, which probably won't make a lot of people happy (since their old configs won't work). I'm also quite happy about the Lua integration, but it still needs improvement. I want to expose more of the Conky internals via the Lua API, but this requires a bit of an internal Conky rewrite first. I'd also like to add some additional output and input options (i.e., drawing to multiple windows, receiving data from multiple remote Conky processes).
And of course, I'd like to add proper XRender support (which means proper transparency on composited X). Patches for this have been submitted already--I just haven't reviewed them yet. I need to stop slacking
The concept of a "Conky 2.0" has been around for a while (and I even began rewriting the code from scratch at one point), but there really isn't anything Conky doesn't already do that I want it to do.
Q: What do you do for a day job? Assuming it's not Conky!
BM: Conky as a day job would certainly be nice--but no, I have a normal job like everyone else. I work for a small wireless software/service company in Berkeley, California. I write code and drink coffee most of the day, and in my spare time I enjoy cycling (I happen to live car-free) and being outdoors in general.
Q: Some of us users out there have started to use the term "CCCC", for the "Creative Collaborative Conky Community". What do you think of that epithet?
BM: I think it's great that I've been a part of something that people find useful (and possibly entertaining). Some of my coworkers even use Conky--but I don't think they know I'm responsible for it. The fact that a community has sprung up around Conky is great and I hope that I can continue to make Conky suck less with every release.
Feature Feature: Imlib2 + Cairo Bindings for Lua
It's been great to see more and more of you starting to use Lua/Cairo in Conky! But did you know that you can use imlib2 bindings in Lua as well? You can combine Cairo drawing and imlib2 image manipulation to get display a photo album, for instance:

The screenshot above was made using Cairo to draw the frame, and imlib2 to draw the image. If you'd like to take a peek at the code, you can download it here: photo_album.lua.tar.gz.
If you'd like to get started using imlib2 in your Lua scripts, I'd offer you the same advice as for Cairo...
First, have a read through the relevant documentation. Then grab some code and start tweaking!
I'm really impressed with the way I've seen Conky users all over the web collaborate to come up with some really great Cairo-drawn images...Now hopefully you'll have a go at imlib2 as well...
Happy Conkying!
Feature Feature: A simple desktop indicator using $desktop
If you don't use a desktop pager in a panel, it's useful to have it displayed on your desktop itself. Here's a quick guide to creating a simple desktop indicator in Conky, using a combination of $image and $desktop.
To give you an idea of what we're aiming for, here's a screenshot, with the desktop indicator in the top right:
The first thing to do is to create two simple images in GIMP or similar program. You'll need one semi-transparent black square (I used 75% transparency) and one opaque white square. You can make them as small as you like, because we'll use $image's -s flag to make them the right size in Conky (I made them 50x50px).
Step 2: Decide on the placement/layout of your desktop indicator boxes
As you can see from the example above, I use my four desktops in a line, but you may use them in a square or rectangle. You'll need to decide where to place all your squares. I did this in my head, but you may also choose to use graph paper to work it out. Conky places images using the top left corner as an anchor, so you'll be interested in the coordinates of that point for each of your squares. In my example above, the size of my Conky dictated that I placed my squares at (3,5) (47,5) (91,5) (135,5) -- starting at x=3, each square was 40px wide with 4px spacing between.
Step 3: Code your Conky!
First, draw all the black, semi-transparent squares:
${image ~/Pictures/bk_semi_trans_sq.png -p 3,5 -s 40x40}${image ~/Pictures/bk_semi_trans_sq.png -p 47,5 -s 40x40}${image ~/Pictures/bk_semi_trans_sq.png -p 91,5 -s 40x40}${image ~/Pictures/bk_semi_trans_sq.png -p 135,5 -s 40x40}
Then, use $if_match and $desktop to choose where to place the white square:
${if_match ${desktop}==1}${image ~/Pictures/wh_sq.png -p 3,5 -s 40x40}${endif}${if_match ${desktop}==2}${image ~/Pictures/wh_sq.png -p 47,5 -s 40x40}${endif}${if_match ${desktop}==3}${image ~/Pictures/wh_sq.png -p 91,5 -s 40x40}${endif}${if_match ${desktop}==4}${image ~/Pictures/wh_sq.png -p 135,5 -s 40x40}${endif}
Et voila! Enjoy your new desktop indicator!
A couple of notes:
You will need to adjust your update_interval config variable (e.g. before TEXT), depending on how responsive you want your indicator to be. I use 0.1.
This method will not work if you are running Compiz. That's because Compiz draws all of your "desktops" as virtual desktops all on one desktop. You will only ever appear to be on desktop 1! The example above was done running OpenBox as a desktop environment, with no compositing.
Feature Feature: own_window_type panel
Conky 1.7.2 includes support for the panel window-type, which means that you can make your Conky behave like other panels. Here's what it looks like to replace a top panel with a Conky panel, so that system information is always on display, even over a maximised window:
To get Conky to behave like a panel, use the following window configuration before the TEXT in your .conkyrc:
own_window yes
own_window_transparent yes
own_window_type panel
own_window_hints undecorate,sticky,skip_taskbar,skip_pager # NB: normally, below is used here, but we don't want that for our panel
Additionally, if you want your panel to stretch all the way across like in the screenie, and flush against the side of the screen, you'll need:
border_inner_margin 0
border_outer_margin 0
minimum_size 1024 0 # replace 1024 with the horizontal resolution of your monitor, if applicable
A final word of warning: if you want your panel to be all on one line, like the screenie above, be sure to code your Conky all in one line, even if you use $goto and $voffset to control text placement. If your code is on three lines, for instance, the size of the Conky window will be big enough for three lines, even if what they output doesn't stretch down that far.
To get your panel to look just like the one in the screenie, there are a couple of finishing touches:
- Use a program like GIMP to create a small (e.g. 50x50 px) semi-transparent black square, and stretch it with the $image variable's -s (size) flag to the size of the panel you want.
- Normally, if you're using Compiz, you want to disable shadows around your Conky window, but for this one, the shadow is quite nice and makes our panel look even more panel-ish!
The .conkyrc for the screenies above is:
background no
update_interval 1
total_run_times 0
cpu_avg_samples 2
net_avg_samples 2
own_window yes
own_window_type panel
own_window_transparent yes
own_window_class Conky-Panel
own_window_hints undecorate,sticky,skip_taskbar,skip_pager
border_inner_margin 0
border_outer_margin 0
double_buffer yes
no_buffers yes
text_buffer_size 2048
imlib_cache_size 0
override_utf8_locale yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
use_spacer none
minimum_size 1024 0
alignment top_middle
gap_x 0
gap_y 0
uppercase no
top_name_width 7
use_xft yes
xftfont Sawasdee Bold:size=8
xftalpha 0.8
default_color ffffffTEXT
${goto 5}${voffset 3}CPU ${cpu}%${goto 60}${voffset -1}${font saxMono:size=8}[${top name 1} (${top cpu 1})] [${top name 2} (${top cpu 2})] [${top name 3} (${top cpu 3})]${font}${goto 425}${voffset -1}MEM ${memperc}%${goto 485}${voffset -1}${font saxMono:size=8}[${top_mem name 1} (${top_mem mem 1})] [${top_mem name 2} (${top_mem mem 2})] [${top_mem name 3} (${top_mem mem 3})]${font}${voffset -2}${font Sawasdee Bold:size=10}${alignr 5}${time %a, %d %b %Y %H.%M}${image ~/Pictures/bk_semi_trans_sq.png -s 1024x18 -p 0,0}${if_match ${battery_percent BAT1} <= 14}${image ~/Pictures/Batteries/battery_1.png -s 16x16 -p 845,1}${else}${if_match ${battery_percent BAT1} <= 27}${image ~/Pictures/Batteries/battery_2.png -s 16x16 -p 845,1}${else}${if_match ${battery_percent BAT1} <= 41}${image ~/Pictures/Batteries/battery_3.png -s 16x16 -p 845,1}${else}${if_match ${battery_percent BAT1} <= 54}${image ~/Pictures/Batteries/battery_4.png -s 16x16 -p 845,1}${else}${if_match ${battery_percent BAT1} <= 68}${image ~/Pictures/Batteries/battery_5.png -s 16x16 -p 845,1}${else}${if_match ${battery_percent BAT1} <= 82}${image ~/Pictures/Batteries/battery_6.png -s 16x16 -p 845,1}${else}${if_match ${battery_percent BAT1} < 95}${image ~/Pictures/Batteries/battery_7.png -s 16x16 -p 845,1}${else}${image ~/Pictures/Batteries/battery_full.png -s 16x16 -p 845,1}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
Special thanks go to *MrStylo for his superb battery icons, and to =mrcool256 for his devastatingly beautiful wallpaper image.
Feature Feature: Built-in Lua Bindings for Cairo
As you may have read in the Conky 1.7.2 feature tour, one of the most exciting new features is the ability to draw directly to Conky's window, using Cairo and/or imlib2. As a demonstration, our own Brenden wrote a little Lua script to use Cairo to draw top information as a pie chart. I modified the script slightly to make it fit with my current desktop...et voila!
To reproduce the look above, I've packaged my .conkyrc, Brenden's original cairo-pie.lua and the cairo-pie.lua I modified, over on my gnome-look.org profile.
There are other examples of Lua scripts for Conky over at norsetto.890m.com and further samples of Cairo scripts at cairographics.org.
Enjoy!




