Conky

Conky is a lightweight system monitor. While that is correct it doesn’t start to explain what Conky can do. Conky can be used to display almost anything you can think of on your Linux desktop. It is simple to use but you can make it as complex as you wish simply by editing the configuration file.

One of the great things is that configuration files from any distro will work on any other distro with little or no change. This means you can copy someone else’s file and use it, adapt it and learn from it. My configuration, like most people’s I guess, is a combination of pieces I found all over the place. See here for a screenshot.

I’ll link to a copy of the file at the bottom of this post along with some links to other info. I’ll go over a few of the parts of my set up that may help someone building their first Conky or maybe looking to improve an existing one. For more information look at the man file for conky with the ‘man conky’ command.

Conky is available for most distros in the standard repos. Most of the temperature readings require lm_sensors (called lm-sensors in some distros) to be installed, configured and running as a service.  There are a couple of other packages needed. I mention them where they are needed.

My Conkyrc File


own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes

#own_window_argb_value=100

These lines do 2 things. First the ‘type’ and ‘hints’ were needed for it to display properly on Xfce. The ‘transparent’ and ‘argb’ lines give transparency.  The line that is commented out (which isn’t in my file) provides a partly transparent background if you prefer it. That does make things easier to read but I prefer full transparency which is the same as setting that line to zero. If you use that line you need to comment out the second line in the section as setting transparency to yes will override the argb value.

<div>

color0 ccaa77
color1 grey
color2 ffff99 #yellow
color3 lightgrey
color4 990033 #dark red
color5 ccaa66 #light gold

You can set colours in the text section but doing it in the layout & options area makes it easier to change colours later. Just one line needs to be edited and the new colour is used right through the display.

In the ‘Text area there is a line for the KDE version. Comment this out if you don’t use KDE.

The next section on the cpu has provision for 4 cores, numbered 0 – 3.  Change this to match the number you have. You could replace the whole lot with a single entry that displays the average for the whole cpu if you prefer.

I’ve commented out the nvidia section as I don’t use the propriatary driver on this system any more and nouveau doesn’t provide this information as far as I can see. If you have any suggestions here please let me know.

The Hard drive section requires hddtemp to be installed and running as a service. You need to edit the /etc/sysconfig/hddtemp file to have the drive in the HDTEMP_OPTIONS= line. I found I couldn’t add 2 drives here. The only way to get it working was to comment the line out. Then all drives are detected.

The last section is for the network details. It uses the ‘if_up’ options to detect which connection I use. This is useful on my laptop where I use Mobile Broadband when I’m not at home and wifi at home. Although this code is for my desktop where I rarely use the mobile broadband. Only for testing and in the rare case of the broadband being down. It requires the following line in the options area at the top.


if_up_strictness address

I find address is the best option here as until an address is found there isn’t a working network connection. See the man file for an explanation and other options.


${if_up ppp0}${font DejaVu Sans:weight=bold:size=10}${color0}MOBILE INTERNET ${font :size=9}(${addr ppp0}) ${hr 2}

$font${color1}Down:$color ${downspeed ppp0}/s${alignr}${color1}Up:$color ${upspeed ppp0}/s
${color0}${downspeedgraph ppp0 25,145 990033 ffbb55} ${alignr}${upspeedgraph ppp0 25,145 990033 ffbb55}
${color1}Downloaded: $color${totaldown ppp0} $alignr ${color1}Uploaded: $color${totalup ppp0}

$else${font DejaVu Sans:weight=bold:size=10}${color0}INTERNET ${font DejaVu Sans:weight=bold:size=9}(${addr em1}) ${hr 2}
$font${color1}Down:$color6 ${downspeed em1}/s${alignr}${color1}Up:$color7 ${upspeed em1}/s
${color0}${downspeedgraph em1 25,145 ffbb55 cc0000} ${alignr}${upspeedgraph em1 25,145 ffbb55 cc0000}

The order is so that it defaults to the home broadband and only shows the Mobile Broadband when it is connected. An ‘endif’ is required too but I have it at the end of the next section so that it is only displayed when I’m at home. If you only use one type of connection you could remove the ‘if_up’, ‘else’ and ‘endif’ as well as one section and edit the remaining section for your connection.

The final part displays the total download for yesterday, the last week and month. It requires vnstat to be installed and running. Unfortunately vnstat is broken in Fedora 16 and hence Kororaa 16, due to systemd I gather. My system is still running 15 so the screenshot shows it working.

That is one of my Conkys. The other one in the screenshot in the last post is for the Amarok track information. You can have as many Conkys running as you want or need.

A good source of further information is the Conky site. There are plenty of sapmle files online a search in your favourite search engine will bring up more than you could ever look at, but here a couple, Conky Galore  and here.

If you are using Conky on Fedora or Kororaa look at this thread on the Fedora forum.

Here is my conkyrc. It is called conkyrc.doc because WordPress doesn’t like text files. Just edit it as required, rename it to .conkyrc and put it in your home directory and start conky. You probably want to have Conky autostart whenever you log in so you don’t have to start it every time.

If you have any questions or any suggestions to improve my setup please add them in the comments. Thanks in advance.

Advertisements

2 thoughts on “Conky

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: