Trouble running Conky

Hi all,
I've just transferred my MB into a fanless case and now want to have a visual indicator of CPU temp

I know I can use $ sensors in terminal, but really want an "always visible" widget

I found Conky and installed via Pamac - I launched the app and get a basic pop-up which disappears the second I click elsewhere on the desktop

I tried searching for the conky.conf but cannot find it anywhere

any guidance would be much appreciated

Thanks
R

See the Arch Wiki entry as well as the official variable documentation (temporarily offline).

Having a config is rather important. You can make one and launch it with a command.

I started keeping mine in a separate folder, but you can keep it anywhere.
the default is in home....
so create a file ~/conky.conf
To run conky from that config use conky -d -c ~/conky.conf

I've an 'old style' conky you could copy - read and edit copies and develop it further.

Summary

Conky settings

background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10

Window specifications

gap_x 10
gap_y 500
minimum_size 0 0
maximum_width 260
alignment top_right
own_window yes
own_window_type normal
own_window_transparent no
own_window_argb_visual yes
own_window_argb_value 200
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 125
border_inner_margin 0
border_outer_margin 0

Graphics settings

draw_shades no
default_shade_color 484848
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders yes
default_graph_size 40 80
show_graph_scale yes
show_graph_range no

Text settings

use_xft yes
xftalpha 0
xftfont Droid Sans:size=9
text_buffer_size 256
override_utf8_locale yes

Useful shortenings

short_units yes
pad_percents 2
top_name_width 30

default_color FFFFFF
color1 FFFFFF
color2 2dcba5 # teal
color3 16a085 # teal2
color4 FFFFFF
color5 DCDCDC
#DCDCDC
color6 FFFFFF
color7 FFFFFF
color8 A9CFF4
#A9CFF4

total_run_times 2000

TEXT

It will only run 2000 times then exit. You can extend this, or you can type '#' at the start of that line to skip it.

In terminal, type 'sensors'
I get this:

type or pas~ >>> sensors
acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +105.0°C)
temp2:        +29.8°C  (crit = +105.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +43.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +42.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:        +43.0°C  (high = +80.0°C, crit = +100.0°C)

~ >>>

Now the temperatures all follow a '+'

Try 'sensors | grep +'

type or paste c~ >>> sensors |grep +
temp1:        +27.8°C  (crit = +105.0°C)
temp2:        +29.8°C  (crit = +105.0°C)
Package id 0:  +42.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +40.0°C  (high = +80.0°C, crit = +100.0°C)
Core 1:        +42.0°C  (high = +80.0°C, crit = +100.0°C)
~ >>>

Now start playing to get the part you want... assuming most cores won't vary much from each other, maybe just pick one for now: ~ >>> sensors | grep Core\ 0:

I used the backslash so I can put a space before the zero (delimiter).
I can also use 'cut' to cut out text from the line. You can select stuff with words like 'cut' and 'sed'.

sensors | grep Core\ 0 | cut -c 10-50                                                  [130]
+39.0°C  (high = +80.0°C, crit =

So you can adjust the 'cut -c' numbers to reduce from 50 until you just have +39.0C.

To put this in conky, we use a line like this:

${exec sensors | grep Core\ 0 | cut -c 15-25}

and that puts +40.0ºC in my conky window.

So you experiment in terminal, then put it into a line in conky underneath the word 'TEXT'.

CPU core temp: ${exec sensors | grep Core\ 0 | cut -c 15-25}

Remember, this will run EVERY time conky 'ticks' so it will use CPU.

You can find ways to use 'exec' and not run it every single time - every few seconds would do the trick I think.

Our final conky so far is:

Summary

Conky settings

background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10

Window specifications

gap_x 10
gap_y 500
minimum_size 0 0
maximum_width 260
alignment top_right
own_window yes
own_window_type normal
own_window_transparent no
own_window_argb_visual yes
own_window_argb_value 200
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 125
border_inner_margin 0
border_outer_margin 0

Graphics settings

draw_shades no
default_shade_color 484848
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders yes
default_graph_size 40 80
show_graph_scale yes
show_graph_range no

Text settings

use_xft yes
xftalpha 0
xftfont Droid Sans:size=9
text_buffer_size 256
override_utf8_locale yes

Useful shortenings

short_units yes
pad_percents 2
top_name_width 30

default_color FFFFFF
color1 FFFFFF
color2 2dcba5 # teal
color3 16a085 # teal2
color4 FFFFFF
color5 DCDCDC
#DCDCDC
color6 FFFFFF
color7 FFFFFF
color8 A9CFF4
#A9CFF4

total_run_times 2000

TEXT
CPU Core Temperature:${exec sensors | grep Core\ 0 | cut -c 15-25}

Tidy it up with some Manaro colouring and tweak the font:

Manjaro colours

Conky settings

background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10

Window specifications

gap_x 10
gap_y 500
minimum_size 0 0
maximum_width 260
alignment top_right
own_window yes
own_window_type normal
own_window_transparent no
own_window_argb_visual yes
own_window_argb_value 200
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 125
border_inner_margin 0
border_outer_margin 0

Graphics settings

draw_shades no
default_shade_color 484848
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders yes
default_graph_size 40 80
show_graph_scale yes
show_graph_range no

Text settings

use_xft yes
xftalpha 0
xftfont Droid Sans:size=9
text_buffer_size 256
override_utf8_locale yes

Useful shortenings

short_units yes
pad_percents 2
top_name_width 30

default_color FFFFFF
color1 FFFFFF
color2 2dcba5 # teal
color3 16a085 # teal2
color4 FFFFFF
color5 DCDCDC
#DCDCDC
color6 FFFFFF
color7 FFFFFF
color8 A9CFF4
#A9CFF4

total_run_times 2000

TEXT
${color2}color2 2dcba5 # teal

${color3}color3 16a085 # teal2

${color3}${font :bold:}CPU Core Temperature:${exec sensors | grep Core\ 0 | cut -c 15-25}

CPU

Ben,
Amazingly thorough and considered response

sincerely, Khop Kun Khap :pray:

I got conky running, but it still closes whenever I click elsewhere
( I used teklek411's .conf file as a starter for 10)

However, I don't actually have the .conky/ folder, at all, anywhere ... ? :face_with_raised_eyebrow:

I don't understand the reference, sorry.

Also any conky needs editing to fit your system, like the wireless (mine is wlp0s20u11 for wireless and en2pso for wired) and if you haven't figured out how to get hddtemp working just yet, that needs editing out.

Try this basic version:

Summary

Conky settings

background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10
Window specifications

gap_x 0
gap_y 2
minimum_size 270 0
maximum_width 270
alignment top_right
own_window yes
own_window_type normal
own_window_transparent no
own_window_argb_visual yes
own_window_argb_value 180
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_argb_visual yes
#own_window_argb_value 0
border_inner_margin 0
border_outer_margin 0
Graphics settings

draw_shades no
default_shade_color 484848
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders yes
default_graph_size 40 80
show_graph_scale yes
show_graph_range no
Text settings

use_xft yes
xftalpha 0
xftfont Droid Sans:size=9
text_buffer_size 256
override_utf8_locale yes
Useful shortenings

short_units yes
pad_percents 2
top_name_width 30
Color scheme

default_color FFFFFF
color1 FFFFFF
color2 2dcba5 # teal
color3 16a085 # teal2
color4 FFFFFF
color5 DCDCDC
color6 EEEEEE
color7 DDDDDD
color8 A9CFF4

total_run_times 2500

TEXT
\

Wired Network


${if_existing /proc/net/route enp2s0}# Wired:
${upspeedgraph enp2s0 50,125 efa644 ff5b00 3500 -l} ${alignr}${downspeedgraph enp2s0 50,125 88a669 55ff1a 10000 -l}
${color }Up: ${upspeed enp2s0} Σ=${totalup enp2s0}${alignr}Dn: ${color8}${downspeed enp2s0} Σ=${totaldown enp2s0}${endif}
\

Wireless


${if_existing /proc/net/route wlp0s20u11}
${upspeedgraph wlp0s20u11 50,125 efa644 ff5b00 3500 -l} ${alignr}${downspeedgraph wlp0s20u11 50,125 88a669 55ff1a 10000 -l}
${color }Up: ${upspeed wlp0s20u11} Σ=${totalup wlp0s20u11}${alignr}Dn: ${color8}${downspeed wlp0s20u11} Σ=${totaldown wlp0s20u11}${endif}
${color}CPU ${color gray40}${if_match ${cpu}>=40}${color lightsalmon}${endif}${if_match ${cpu}>=75}${color red}${endif}${cpubar 6}
${color}RAM ${color grey40}${if_match ${memperc}>=75}${color lightgreen}${endif}${membar 6}
${color2}$hr
\

Storage


${color}SSD ${color gray40}${if_match ${fs_used_perc}>=75}${color lightsalmon}${endif}${if_match ${fs_used_perc}>=85}${color red}${endif}${fs_bar 6}${font }
${if_existing /dev/sda}${color }sda ${goto 60} ${fs_free /mnt/T4} ${color grey40} ${goto 105}${if_match ${fs_used_perc /mnt/T4}>=85}${color salmon}${endif}${if_match ${fs_used_perc}>=95}${color red}${endif} ${alignr }${fs_bar 6,140 /mnt/T4}${if_existing /dev/sda}${endif}${font }${color }
${endif}
${color2}$hr
${font :bold:size=9}${color }Top Name ${goto 120} CPU MEM ${alignr} PID${font }
${color #dddddd}${top name 1} ${goto 120}${top cpu 1} ${top mem 1}${alignr}${top pid 1}
${color #aaaaaa}${top name 2} ${goto 120}${top cpu 2} ${top mem 2}${alignr}${top pid 2}
${color #999999}${top name 3} ${goto 120}${top cpu 3} ${top mem 3}${alignr}${top pid 3}
${color #888888}${top name 4} ${goto 120}${top cpu 4} ${top mem 4}${alignr}${top pid 4}${color }
${color2}$hr
${color }${font :bold:size=9}Top Memory ${goto 120} CPU MEM ${alignr} PID ${font }
${color #dddddd}${top_mem name 1} ${goto 120} ${top_mem cpu 1} ${top_mem mem 1}${alignr}${top_mem pid 1}
${color #bbbbbb}${top_mem name 2} ${goto 120} ${top_mem cpu 2} ${top_mem mem 2}${alignr}${top_mem pid 2}
${color #aaaaaa}${top_mem name 3} ${goto 120} ${top_mem cpu 3} ${top_mem mem 3}${alignr}${top_mem pid 3}
${color #888888}${top_mem name 4} ${goto 120} ${top_mem cpu 4} ${top_mem mem 4}${alignr}${top_mem pid 4}

Youtube "Install the Conky Dashboard on Linux Mint 19.1"

I'll keep playing with the conf file (now that I know how to run it)

Thanks

Ok, but compare that conky
conky-web
To my conky
conkies
It seems an odd choice.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by