Conky System Monitor

Introduction
Conky is a program that allows you to always keep under control the resources of our PC such as, for example, CPU, RAM and disks.

You can see below what it looks like (separated in two for a better view):



Installation
Installation in Ubuntu is as always very simple: sudo apt install conky-all

Configuration
The best way to configure Concy is from an existing configuration. I took my cue from this site and made several changes over time.

The configuration file is located in your home directory ($HOME) and is called .conkyrc.

Below you will find the one corresponding to the images above: conky.config = { alignment = 'top_right', background = true, border_width = 2, color0 = 'DimGray', color1 = 'DarkSlateGray', color2 = 'tan1', cpu_avg_samples = 2, default_color = 'DimGray', default_outline_color = 'DimGray', default_shade_color = 'DimGray', double_buffer = true, draw_borders = false, draw_graph_borders = false, draw_outline = false, draw_shades = false, gap_x = 10, gap_y = 40, maximum_width = 300, minimum_width = 300, minimum_height = 300, net_avg_samples = 2, no_buffers = true, out_to_console = false, override_utf8_locale = true, own_window_colour = 'black', own_window_transparent = false, own_window_type = 'desktop', own_window = true, short_units = false, text_buffer_size = 1024, top_cpu_separate = false, total_run_times = 0, update_interval = 1, uppercase = false, use_spacer = 'none', use_xft = true, xftalpha = 0.1, font = 'Arial:size=8',

};

conky.text = [[ ${if_existing /etc/issue.net}${font Arial:size=20}${color2}${alignc}${head /etc/issue.net 1 3600}${font}${color0}${endif}

${font Arial:bold:size=10}${color2}SISTEMA ${color1}${hr 2}${font}${color0} ${sysname} ${goto 120}${kernel}  ${alignr}${machine} Clock ${alignr}${freq_g cpu0}GHz Acceso da ${alignr}${uptime_short} Temperatura ${alignr}${acpitemp}°C

${font Arial:bold:size=10}${color2}DATA E ORA ${color1}${hr 2}${font}${color0} ${time %A} ${goto 120}${time %d %B %Y}  ${alignr}${time  %H:%M}

${font Arial:bold:size=10}${color2}PROCESSORI ${color1}${hr 2}${font}${color0} CPU1 ${cpu cpu1}%  ${cpubar cpu1} CPU2 ${cpu cpu2}%  ${cpubar cpu2} CPU3 ${cpu cpu3}%  ${cpubar cpu3} CPU4 ${cpu cpu2}%  ${cpubar cpu4} ${cpugraph cpu0 20}

${font Arial:bold:size=10}${color2}MEMORIA ${color1}${hr 2}${font}${color0} RAM ${goto 60}${memperc}%  ${membar 6,100}  ${alignr}${mem} / ${memmax} Cache ${alignr}${cached}

${font Arial:bold:size=10}${color2}DISCHI ${color1}${hr 2}${font}${color0} / ${goto 60}${fs_free_perc /}%  ${fs_bar 6,100 /}  ${alignr}${fs_used /} / ${fs_size /}${if_mounted /boot} /boot ${goto 60}${fs_free_perc /boot}%  ${fs_bar 6,100 /boot}  ${alignr}${fs_used /boot} / ${fs_size /boot}${endif}${if_mounted /home} /home ${goto 60}${fs_free_perc /home}%  ${fs_bar 6,100 /home}  ${alignr}${fs_used /} / ${fs_size /home}${endif}${if_mounted /opt} /opt ${goto 60}${fs_free_perc /opt}%  ${fs_bar 6,100 /opt}  ${alignr}${fs_used /opt} / ${fs_size /opt}${endif}${if_mounted /tmp} /tmp ${goto 60}${fs_free_perc /tmp}%  ${fs_bar 6,100 /tmp}  ${alignr}${fs_used /tmp} / ${fs_size /tmp}${endif}${if_mounted /var} /var ${goto 60}${fs_free_perc /var}%  ${fs_bar 6,100 /var}  ${alignr}${fs_used /var} / ${fs_size /var}${endif}${if_mounted /var/tmp} /var/tmp ${goto 60}${fs_free_perc /var/tmp}%  ${fs_bar 6,100 /var/tmp}  ${alignr}${fs_used /var/tmp} / ${fs_size /var/tmp}${endif} ${diskiograph /dev/sda 20}

${font Arial:bold:size=10}${color2}PROCESSI ${color1}${hr 2}${font}${color0} ${top name 1} ${alignr}${top cpu 1}% ${top name 2} ${alignr}${top cpu 2}% ${top name 3} ${alignr}${top cpu 3}% ${top name 4} ${alignr}${top cpu 4}%

${font Arial:bold:size=10}${color2}RETE ${color1}${hr 2}${font}${color0} IP Esterno ${alignr}${texeci 1800 curl https://ipinfo.io/ip}${if_up eth1} IP Interno ${alignr}${addr eth1} Download ${goto 120}${downspeed eth1}KiB/s  ${alignr}${totaldown eth1} Upload ${goto 120}${upspeed eth1}KiB/s  ${alignr}${totalup eth1} ${downspeedgraph eth1 20}${endif}${if_up eth0} IP Interno ${alignr}${addr eth0} Download ${goto 120}${downspeed eth0}KiB/s  ${alignr}${totaldown eth0} Upload ${goto 120}${upspeed eth0}KiB/s  ${alignr}${totalup eth0} ${downspeedgraph eth0 20}${endif}

]];
 * 1) ${font Arial:bold:size=10}${color2}METEO ${color1}${hr 2}${font}${color0}
 * 2) ${execpi 1800 conkyForecast --location=SZXX0020 --template=$HOME/.conkyForecast.template}

Customization
There are several aspects that you may need to adapt to your needs.

Colours
Depending on the wallpaper you use, the current colors may not fit. To change them you will need to act on these variables: color0 = 'DimGray'              <- colour of the inscriptions color1 = 'DarkSlateGray'        <- colour of the lines color2 = 'tan1'                 <- colour of the titles If you don't like the transparent Conky background, change it: own_window_colour = 'black'     <- background colour own_window_transparent = false  <- transparency

CPU
If you do not have four CPUs or Cores, delete the unnecessary lines: CPU1 ${cpu cpu1}%  ${cpubar cpu1} CPU2 ${cpu cpu2}%  ${cpubar cpu2} CPU3 ${cpu cpu3}%  ${cpubar cpu3} CPU4 ${cpu cpu2}%  ${cpubar cpu4} To know the exact number of CPUs or Cores in your system: nproc

Automatic Start
Make sure that Conky starts automatically when you turn on your PC by creating a new entry under System > Preferences > Sessions: Name:   Conky Command: conky -d -q Comment: A system monitor for X

More information
https://github.com/brndnmtthws/conky