Conky is a lightweight system monitoring tool for linux. Fortunately, it’s config is not rocket-science, but it can lead to a quite comlicated script.

I made a .conky folder in my home, and created 5 files, for the different purpose conky windows. I needed this to be able to set different referesh time – I don’t want to read the disk temperature every 1 sec, instead of the clock, which obviously needs refresh every sec.

I also created a conky_start script with the following content:

#!/bin/bash
conky -c /home/foo/.conky/conky_clock -d
conky -c /home/foo/.conky/conky_sys -d
conky -c /home/foo/.conky/conky_hdd -d
conky -c /home/foo/.conky/conky_io -d
conky -c /home/foo/.conky/conky_net -d

So it starts all conky configs in daemon mode, in the background.

These are the lines, that are the same in every individual conky config, lets call it the common part!

use_xft yes
xftfont DejaVu Sans:size=9
xftalpha 0.8
text_buffer_size 2048
total_run_times 0
no_buffers yes
uppercase no
cpu_avg_samples 1
net_avg_samples 1
override_utf8_locale yes
double_buffer yes
use_spacer none
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
minimum_size 240 0
maximum_width 240
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
border_margin 0
border_width 0
default_color grey
own_window_colour grey
alignment top_right

and the individual parts:
conky_clock

gap_x 35
gap_y 35
update_interval 1

TEXT
${alignc 20}${font Arial Black:size=16}${time %H:%M:%S}${font}
${alignc}${time %Y %b %d, %A}

conky_sys

gap_x 35
gap_y 100
update_interval 4

TEXT
SYSTEM ${hr 2}
Kernel ${alignr}${kernel}

CPU0 ${alignr}${cpu cpu0}%   ${freq 0}MHz   ${cpubar cpu0 6,40}
CPU1 ${alignr}${cpu cpu1}%   ${freq 1}MHz   ${cpubar cpu1 6,40}

RAM ${alignr}$mem / $memmax ${alignr}${membar 6,40}
SWAP ${alignr}$swap / $swapmax ${alignr}${swapbar 6,40}

CPU ${alignr}${hwmon temp 2}°C
ACPI ${alignr}${acpitemp}°C

conky_hdd

update_interval 10
gap_x 35
gap_y 320

TEXT
HDD /dev/sda ${hr 2}
${exec hdsentinel -solid | cut -d" " -f2 }°C ${alignc}${exec hdsentinel -solid | cut -d" " -f3 }% ${alignr}${exec hdsentinel -solid | cut -d" " -f4 } hours

root ${alignr}${fs_bar 6,40 /}
${fs_size /} ${alignr}${color #994444}${fs_used /}${color}	${color #449944}${fs_free /}${color}

d-lyra ${alignr}${fs_bar 6,40 /disk/d-lyra}
${fs_size /disk/d-lyra}	${alignr}${color #994444}${fs_used /disk/d-lyra}${color}${color #449944}${fs_free /disk/d-lyra}${color}

e-daenerys ${alignr}${fs_bar 6,40 /disk/e-daenerys}
${fs_size /disk/e-daenerys} ${alignr}${color #994444}${fs_used /disk/e-daenerys}${color}	${color #449944}${fs_free /disk/e-daenerys}${color}

For this one, I also need HDSentinel (http://www.hdsentinel.com/hard_disk_sentinel_linux.php), placed in /usr/bin, chmod 0755 /usr/bin/hdsentinel and chmod u+s /usr/bin/hdsentinel.

conky_io

update_interval 1
gap_x 35
gap_y 570

TEXT
IO /dev/sda${hr 2}
read ${alignr}${diskio_read /dev/sda} ${diskiograph_read /dev/sda 6,40 789E2D A7CC5C}
write ${alignr} ${diskio_write /dev/sda} ${diskiograph_write /dev/sda 6,40 789E2D A7CC5C}

conky_network

update_interval 1
gap_x 35
gap_y 700

TEXT
NETWORK ${hr 2}
${if_running pppd}Up ${alignr}${upspeed ppp0} ${upspeedgraph ppp0 6,40 789E2D A7CC5C}
Down ${alignr}${downspeed ppp0} ${downspeedgraph ppp0 6,40 789E2D A7CC5C}
Upload ${alignr}${totalup ppp0}
Download ${alignr}${totaldown ppp0}
Ip ${alignr}${addr ppp0}${else}${if_existing /proc/net/route wlan0}SSID:${alignr}${wireless_essid wlan0}
Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 6,40 wlan0}
Up: ${upspeed wlan0} ${alignr}${upspeedgraph wlan0 6,40 44FF44 44FF44}
Down: ${downspeed wlan0} ${alignr}${downspeedgraph wlan0 6,40 FF4444 FF4444E}
Upload: ${alignr}${totalup wlan0}
Download: ${alignr}${totaldown wlan0}
Local Ip: ${alignr}${addr wlan0}${else}${if_existing /proc/net/route eth0}Up: ${upspeed eth0} ${alignr}${upspeedgraph eth0 6,40 789E2D A7CC5C}
Down: ${downspeed eth0} ${alignr}${downspeedgraph eth0 6,40 789E2D A7CC5C}
Upload: ${alignr}${totalup eth0}
Download: ${alignr}${totaldown eth0}
Local Ip: ${alignr}${addr eth0}${else}${if_existing /proc/net/route eth1}Up: ${upspeed eth1} ${alignr}${upspeedgraph eth1 6,40 789E2D A7CC5C}
Down: ${downspeed eth1} ${alignr}${downspeedgraph eth1 6,40 789E2D A7CC5C}
Upload: ${alignr}${totalup eth1}
Download: ${alignr}${totaldown eth1}
Local Ip: ${alignr}${addr eth1}
${endif}

The result:
my conky