The Conky Desktop Dashboard

When it comes to easily digestible, real-time system information in Linux, the Conky tool provides a quick means of setting up a desktop dashboard for reporting metrics on your system’s activity.

A version is available in the ‘Software Manager’ on Linux Mint distributions, and can be easily customized using Lua scripting syntax in the /etc/conky/conky.conf file. The above dashboard configuration was modified to reflect additional information not included in the default configuration such as color scheme, the kernel version as a header, rearranging the order of metrics, adding a line that includes WiFi up/down rates, radio signal strength, Disk I/O, temperature, refresh rate, additional lines of the process monitor, and a few other tweaks. Conky source can be found on GitHub, and an example with the corresponding configuration file can be seen below:

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
	default_color = 'green',
    default_outline_color = 'green',
    default_shade_color = 'green',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=10',
    gap_x = 3,
    gap_y = 0,
    minimum_height = 4000,
	minimum_width = 370,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
	own_window_colour = 'black', -- background color
    own_window_argb_visual = true,
    own_window_argb_value = 210, -- 0 (transparent) to 255 (opaque)
    stippled_borders = 0,
    update_interval = 0.95,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false

conky.text = [[
${alignc}${color grey}SYSTEM STATUS
${hr 6}
${color grey}Uptime:$color $uptime ${color grey}${alignr}Temperature: ${color green}${acpitemp}C

${color grey}Disk Free: $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}${hr 2}
${color grey}${alignc}CPU Usage
${color white}${alignc}${cpugraph 45,250 ffffff 00ff00}
${color green}$cpu% ${cpubar 5}
${color grey}${alignc}CPU Frequency:$color $freq_g ${color grey}${font DejaVu Sans Mono:size=8}(GHz)
${font DejaVu Sans Mono:size=10}${color grey}${hr 2}
${color grey}${alignc}RAM Usage
${color white}${alignc}${memgraph 45,250 ffffff 00ff00}
${color green}$mem${color grey}/${color green}$memmax ${color grey}- ${color green}$memperc% ${membar 4}

${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}${hr 2}

${alignc}${color grey}Started:$color $processes  ${color grey}Active:$color $running_processes ${color grey} Disk I/O: ${color green}${diskio}
${color grey}
Name               PID    CPU%   MEM%
${color ff9576} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color ffb050} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color ffe860} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color f6ff60} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color fbf79c} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}

${color grey}${hr 2}

${color grey}wlp4s0 (${color green}${addrs wlp4s0}${color grey}):

${alignc} ${color green}${downspeedf wlp4s0}${color grey} kB/s ${goto 145}${template0} ${alignc}        ${color grey}${color green}${upspeedf wlp4s0} ${color grey}kB/s
${alignc}${downspeedgraph wlp4s0 50,120 ffffff 00ff00 -t} ${upspeedgraph wlp4s0 50,120 ffffff 00ff00 -t}

${alignc}Signal Strength: ${color green}${wireless_link_qual wlp4s0}%
${color grey}${alignc}Wireless AP MAC: ${color green}${wireless_ap wlp4s0}
${color grey}${hr 2}
${alignc}${color grey}Kernel Version: ${color green} $kernel
${color grey}${hr 6}

Running the ‘conky’ command from a terminal will activate the dashboard on your desktop. Which is great when testing, in fact updating the configuration file and saving it will refresh and update your running instance in real-time. What about a persistent instance that runs when you log into your machine? Well, in distributions like Linux Mint, there is a Startup Applications menu that you can configure with a GUI with no need to link a saved script. Opening Startup Applications and clicking “Add” at the bottom of the window will allow you to set something up like this:

You can just make an entry in the “Command” field that simply executes ‘conky’, and maybe give it a slight delay in seconds to assign a reduced priority when loading your desktop at login. If you’ve never accessed this feature before, you can also disable any unneeded services for a less sluggish desktop boot. By default, all services are not listed here, but running the following command will produce a full list that displays the once-hidden processes:

sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop

The configuration file for startup applications can be found in the ~/.config/autostart directory. The “~” character is what points at your home directory, and from here the *.desktop files are what contain the variables that influence the behavior of included applications at start, as with our entry for Conky we made with the Startup Applications GUI:

[Desktop Entry]
Name[en_US]=Conky Desktop Stat

I encourage you to experiment with the Conky configuration file possibilities, after a quick search I found numerous examples of some really impressive configurations that blow this post’s example out of the water. You can even send me your conky.config files with a screenshot and I’ll attach it to this post.

Keep coding!

~ Dan