5 Dec 2013

Conky - Highly Configurable Desktop Monitor

Conky, or call it an "Active Wallpaper", is an application that can display dynamic information on what's going on with the computer on our desktop.

Conky is highly configurable in its looks, in what and how it displays, whether text, bar, graph or special iconic fonts and how often and where-about on the screen, in all three dimensions.




Let's look at the default configuration file: conky.conf that ships with Conky and found in /etc/conky/

After all the credits and free software rave, after all the # we see settings parameters to do with position, background, borders, gaps window type, updating intervals, etc.

There is also a local configuration file: .conkyrc in our home directory ~/ (the “ . “ before conkyrc means that it is a hidden file). Conky looks first for this file and if not found then the above conky.conf is used.

How we can configure Conky? You need to change the text in the configuration file, presumably you do it in the local one. For example:
xftfont DejaVu Sans Mono:size=12
is where we can change the font, type and size.


But what we actually see is what comes after line: "TEXT".


A " $ " before " { " makes content invisible and treats it as a command or as an option. For example, the command
${cpubar 4} 
will display a dynamic bar 4 pixels high showing percentage of CPU Usage and
$color 
means the bar shows in the default colour used. This is set at line:
default_color white

It's fun to experiment with conky, to get columns lined up, get a colour scheme going.

So here is what I made of the above to be a part of my own configuration:

TEXT

${color light blue}Ubuntu 12.04 @ ${color orange}$nodename $machine

${color white}Kernel ${color orange}$sysname$kernel

${color lightgreen}Uptime ${color orange}$uptime

${color eeee5e}HDD used ${color orange}${fs_used /} ${color eeee5e} Free ${color orange}${fs_free /}

${color eeee5e}$fs_used_perc% ${color eeee5e}used ${color eeee5e}${fs_bar /}

${color pink}RAM used ${color orange}$mem ${color pink} Of ${color orange}$memmax

${color pink}$memperc% used ${color AC00CE}$membar

${color cyan}CPU Processes ${color orange}$processes ${color cyan}Running ${color orange}$running_processes

${color cyan}${cpu} % ${color cyan}used ${color cyan}${cpubar}

${color black}${cpugraph 000000 00F0F0}

${color cyan}CPU-Temp ${color yellow}${hwmon temp 1}${color yellow} C°


There are many threads on forums dealing with conky options. Like this one for Ubuntu: https://help.ubuntu.com/community/SettingUpConky

Let me quote an excerpt from that page:

CONKY - Conky is a system monitor for X originally based on the torsmo code.

Since its original conception, Conky has changed a fair bit from its predecessor. Conky can display just about anything, either on your root desktop or in its own window. Conky has many built-in objects, as well as the ability to execute programs and scripts, then display the output from stdout.

ConkyForecast

One of the most exciting variants of conky was conkyForecast, a Weather Forecaster. It could be integrated into the conky configuration and showed latest weather data and a few days of weather forecast. It relied on http://xml.weather.com for free updates. It seems that this service stopped.

If the conky configuration includes weather data and is not corrected, then conky will labour so much, when trying to connect to the net, that it won't update any info at all and waste CPU usage.

For 4-CLIX 7.1.4 users the remedy is to:

  1. Press Ctrl + H to unhide hidden files (with a “ . “ dot in front), then backup the configuration file /home/user/.conkyrc by copying it to .conkyrc.bak just in case there will be or is already a new solution to make conkyForecast work again.
  2. Then open .conkyrc with a text editor and delete all lines after line 245.
  3. Then in Synaptic Package Manager find conkyForecast and un-install it.

This shows what that section of conky looked like. Quite neat, ey! What a pitty it's dead. I'm hoping for a miraculous re-appearance of weather forecasting in conky. It already had a 2nd rebirth.



My new 4-CLIX 7.1.4.1 does not include the Conky Weather Forecaster any longer.

Conky Manager


Things get easier and now a Conky Manager with GUI is available. It can display 7 different pre-set windows, all adjustable as well. Here is an example from its creator's homepage: http://www.webupd8.org/2013/07/conky-manager-gui-for-managing-conky.html


To install it in Ubuntu, etc. type (copy and paste) following into a terminal:
sudo apt-add-repository -y ppa:teejee2008/ppa

sudo apt-get update

sudo apt-get install conky-manager

If you install it the local .conkyrc file will be deleted. So if you have one it is wise to back it up first.

Warning

Warning to partners of conky tweakers:

We lose any sense of time when we try to get it "just right".

Minutes turn into days; just kidding!...........or maybe not?


This is a guest post by Rolf Sommerhalder, Australia 2013-11-13

6 comments:

  1. thanks for post.

    i haven't explored far with Conky, but didn't get it to have NO background color, which I'd prefer as I like my backgrounds changing every 20 minutes

    chris g.

    ReplyDelete
    Replies
    1. Well, you can normally make the Conky background entirely transparent. Depending on your window manager and any compositing software you may be running, though, you may have issues. Of course, whether it's transparent or not depends on a configuration setting.

      Crunchbang has Conky on by default with transparency working will with Openbox and Compton. When you change wallpapers there can be a small delay before the Conky background changes, but it does change.

      Delete
    2. (my default de is KDE; so kwin/kdm. KDE contains a system info widget that displays everything but top task info, but its configuration is...)

      Regardless thanks, it prompted me to go look at online doco
      http://conky.sourceforge.net/faq.html
      which had me change a few things for when I use XFCE.
      Found it [own_window_transparent] which required more change as was hard to read in my prior colors....

      Thanks again.

      Delete
    3. just in case it'll help others - I found different machines required different configuration to achieve same result [transparency]..

      under conky 1.9.0 compiled fri may 10 2013; solydK
      own_window yes
      under conky 1.9.0 compiled fri may 11 2012; debian
      own_window no
      both achieved same same result.

      Delete
  2. I do agree with the ending note.

    ReplyDelete
  3. I've used and loved Conky in the past. I'm not using it right now as it just stopped showing up when I switched over to KDE from xfce. I haven't put the time in to figure out why. Of course, that doesn't reduce the awesome.

    ReplyDelete