Thursday, 16 July 2009

TIP: Be Savvy About the Order of Things in Conky!

Here's a quick shot of my current desktop:
From Screenshots

A brief summary: I'm running Ubuntu with Gnome; I actually use a top and bottom panel, both auto-hidden to 0px (I'll share that tip in another post), my system information is drawn to the desktop using Conky, and I use Gnome-Do as a launcher, so I don't need a menu or dock bar.

In my Conky, I use a combination of ${goto}, ${offset} and ${voffset} to cover the placement of everything, including ConkyForecast, which finds me the weather. I found that you have to be really careful of how you call the various pieces of the code, however, to manage drawing things in the right order! For instance, it isn't obvious, but in this example, I draw the CPU/memory bars and their associated processes first, under the beach hut, then the battery and hard drive bars right at the bottom, then the clock and date, and finally the ConkyForecast. Normally you'd think you'd want to draw it from the top down, to minimise jumping all over the screen, but drawing it this way does a couple of things:
  • It ensures that when my huge funky font splashes out over a large part of the screen, it draws on top of the CPU/memory bars, rather than below it, and
  • When starting up from OFF, ConkyForecast can't query the weather until you're connected to the internet; if you put ConkyForecast first, it doesn't draw anything, and if you've used ${offset} or ${voffset} relative to its placement, the rest of your information will be misaligned.
I'll post some example screenies soon.

Happy tweaking!

No comments:

Post a Comment