Conky revisited

It’s pefecting. And perfecting. And so it’s time to revisit my conky setup. From the conky github page, we read:

Conky is a free, light-weight system monitor for X, that displays any kind of information on your desktop.

It can display anything on your Linux (or *BSD) desktop; Your calendar(s), the weather, system information, text or fancy graphics. It can also be a simple, slim and non-intrusive line of information at the top of your desktop. Like on my system:

conky-screenshot

Conky is the text line on the top, starting with the time (22:32). The rest is my weechat communications hub (which is my first desktop out of the 5 desktops I normally have). The window manager is i3.

conky0

To get this conky line, you can use my conkyrc config file. Let’s go through it step-by-step:

conky1
The first part is the time and date and the week number in parenthesis (with the day number in the week – starting with monday – as the number after the period). The code goes like this:

${time %H:%M  %Y-%m-%d (%V.%u)}

Show time and date, week number and day number in the week

conky2

${execi 1800 /home/geir/bin/weather1no.rb} ${execi 1800 gcal -c | awk '/Moon/, /$/' | sed -e 's/^.*: //'}

Show the Moon phase (config in .gcalrc), “-” indicates a waning moon while “+” indicates a vexing moon.

conky3

C: ${if_match ${cpu cpu0}80}"\#ff0000"${else}"\#aaaaaa"${endif} }

Show CPU load (pad to two digits), system load and CPU temperature (color red if above 80 deg celsius)

conky4

M: ${if_match ${memperc}<10} ${endif}${memperc}% ${swapperc}%  D: ${fs_free_perc /}%

Memory usage (padded to two digits), Swap usage, Disk usage

conky5

IP: ${if_up wlan0}${addr wlan0} (${wireless_essid wlan0}${if_match ${wireless_link_qual_perc wlan0}<100} ${endif}${wireless_link_qual_perc wlan0}%) /dev/null; then echo "O"; else echo "X"; fi;}>

Show IP address, wifi essid and strength (if wifi). Print “” if the address can be reached (www.vg.no), and “” if not

conky6

${if_existing .mail.lock}.${else} ${endif}${exec echo `cat /home/geir/.mail2 | grep G`}  ${exec echo `cat /home/geir/.mail2 | grep A`}${if_existing .nomail} [NoMail]${endif}${if_existing .nonet} [NN]${endif}${if_existing .mail.fail} [NL]${endif}

Show a dot if the script mail_fetch.rb is running, a space if not. Content of local imap Maildir boxes that are watched by mail_fetch. Show ” [NoMail] ” if the NoMail directive is set via mail_fetch. Show ” [NN] ” if mail_fetch cannot get Net access. Show ” [NL] ” if mail_fetch fails to login to local or remote server.

conky7

V: ${texeci 3 /home/geir/bin/conky_vol.sh}${texeci 3 /home/geir/bin/conky_volM.sh}
L: ${texeci 10 xbacklight -get | awk '{print int($1)}'}
${battery_short BAT1}${if_match ${battery_percent BAT1}<6}  ${blink XXXXX} ${endif}${if_match ${battery_percent BAT1}<4}${execi 60 i3lock -c 000000 && sudo pm-suspend}${endif} " , "color" : ${if_match ${battery_percent BAT1}<5}"\#ff0000"${else}"\#dddddd"${endif} }

Show volume level (and “[Off] (from aumixer) if volume is off). Show LCD brightness level. Battery percentage and three spaces to pad the output from the right edge. Write out “XXXXX” if battery is below 6%. Suspend if battery is below 4%. The far right is reserved for the system tray (you see nm-applet residing there with the wifi link quality showing as an icon). Dropbox and other icons pop up there as needed.

I also have a more detailed system information conky on my desktop as well as my calendar for the next two weeks. Mora about those in a future post (maybe).

One thought on “Conky revisited

Have your say

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 )

Facebook photo

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

Connecting to %s