Why is my Conky going wonky after recent updates? Long running machines and new installations both have been showing double-spaced displays for the past couple of months. Even if I strip out the configs
e v e r y t h i n g i s n o w d o u b l e s p a c e d .
Which font do you use ?
I suspect it’s not a mono-space one
DejaVu Sans Mono:size=8
This has been running just fine on a couple of my machines. It still is running on one machine that I haven’t updated in a while. But on the ones I did update, the text double-spaces, and the window enlarges to fit.
I tried an installation on a new machine, and even this doubles, so I guess it’s something that changed in Conky itself.
conky.config = {
alignment = 'top_right',
background = false,
border_width = 2,
cpu_avg_samples = 2,
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = false,
extra_newline = false,
font = 'DejaVu Sans Mono:size=8',
gap_x = 60,
gap_y = 60,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_x = true,
own_window = true,
own_window_class = Conky,
own_window_type = desktop,
show_graph_range = false,
show_graph_scale = false,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
use_xft = true,
}
conky.text = [[
${color #ffffff}Local $time | Up:$color$uptime}
${color #ffffff}UTC $utime | Swap $swap}
${color grey}RAM:$color $memperc% ${membar 4} CPU:$color $cpu% ${cpubar 4}
${color grey}CPU:$color $cpu% ${cpubar 4}
${color grey}Files: $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}$hr
${color #007700}Net Down:$color ${downspeed enp3s0f0} ${color #770000}Net Up:$color ${upspeed enp3s0f0}
${color green}${downspeedgraph enp3s0f0 32,155 green} $alignr${color red}${upspeedgraph enp3s0f0 32,155 red}
${color grey} Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]
---
Code tag - try typing three ticks (the top left key with ~% on it)
```
then code
```
code
Good for pasting paragraphs of code.
Anyway, comparing to my (working) conky there are a couple of differences (haven’t tested it yet).
As it’s also laid out very differently, I think it’s easier I just give you mine - and you can compare and adjust.
The top one is a clock. Using tiled windows, it’s always on top. This is
c0.conky
conky.config = {
-- Conky settings
background = true,
update_interval = 1,
double_buffer = true,
no_buffers = true,
imlib_cache_size = 10,
-- Sampling
diskio_avg_samples = 2,
cpu_avg_samples = 2,
-- Window specifications
gap_x = 20,
gap_y = 30,
minimum_width = 0, minimum_height = 0,
alignment = 'top_right',
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_argb_value = 70,
own_window_hints = 'above, undecorated,sticky,skip_taskbar,skip_pager',
own_window_class = 'conky',
border_inner_margin = 0,
border_outer_margin = 0,
graphics = 'settings',
draw_shades = false,
default_shade_color = '#484848',
draw_outline = true,
default_outline_color = '#333',
draw_borders = false,
draw_graph_borders = false,
default_graph_width = 40, default_graph_height = 80,
show_graph_scale = true,
show_graph_range = false,
text = 'settings',
use_xft = true,
xftalpha = 0.5,
font = 'Droid Sans:size=10',
text_buffer_size = 256,
override_utf8_locale = true,
useful = 'shortenings',
short_units = true,
pad_percents = 2,
top_name_width = 30,
color = 'scheme',
default_color = '#FFFFFF',
color1 = '#FFFFFF',
color2 = '#2dcba5',-- teal
color3 = '#bbb',-- Grey
color4 = '#ebdbb2',--Gruv
color5 = '#89cf8c',
color6 = '#dddddd',
color7 = '#aaaaaa',
color8 = '#A9CFF4',--Nord
};
conky.text = [[
${alignc}${color4}${font arial rounded mt bold:size=32}${time %H:%M}]];
Next is the ‘network’ conky -
c1.conky
conky.config = {
-- Conky settings
background = true,
update_interval = 1,
double_buffer = true,
no_buffers = true,
imlib_cache_size = 10,
-- Sampling
diskio_avg_samples = 2,
cpu_avg_samples = 2,
-- Window specifications
gap_x = 7,
gap_y = 90,
minimum_width = 14, minimum_height = 50,
maximum_width = 250,
alignment = 'top_right',
own_window = true,
own_window_type = 'dock',
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 80,
own_window_hints = 'below,undecorated,sticky,skip_taskbar,skip_pager',
border_inner_margin = 0,
border_outer_margin = 0,
graphics = 'settings',
draw_shades = false,
default_shade_color = '#484848',
draw_outline = false,
default_outline_color = '#dddddd',
draw_borders = false,
draw_graph_borders = false,
default_graph_width = 40, default_graph_height = 80,
show_graph_scale = true,
show_graph_range = false,
text = 'settings',
use_xft = true,
xftalpha = 0,
font = 'Droid Sans:size=9',
text_buffer_size = 256,
override_utf8_locale = true,
-- Useful shortenings #
short_units = true,
pad_percents = 2,
top_name_width = 30,
color = 'scheme',
-- Color scheme #
default_color = '#999999',
color1 = '#FFFFFF',
color2 = '#2dcba5',-- teal
color3 = '#16a085',-- teal2
color4 = '#FFFFFF',
color5 = '#DCDCDC',
color6 = '#FFFFFF',
color7 = '#FFFFFF',
color8 = '#A9CFF4',
total_run_times = 1000,
};
conky.text = [[${if_existing /proc/net/route enp2s0} ${upspeedgraph enp2s0 30,50 efa644 ff5b00 3500 -l} ${downspeedgraph enp2s0 30,50 337225 33dd16 10000 -l}${color }${font }
${upspeed enp2s0} ${goto 50} ${downspeed enp2s0}${endif} ${if_existing /proc/net/route wlp0s20u12}WiFi${upspeedgraph wlp0s20u12 50,125 cfcd8f d0865f 3500 -l} ${alignr}${downspeedgraph wlp0s20u12 50,125 88a669 55ff1a 10000 -l}
${color } Up: ${upspeed wlp0s20u12} Σ=${totalup wlp0s20u12}${alignr}Dn: ${color8}${downspeed wlp0s20u12} Σ=${totaldown wlp0s20u12}${endif} ${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}
${if_match ${memperc}<=50}${color green}${if_match ${memperc}>=50}${color lightgreen}${if_match ${memperc}>=75}${color yellow}${endif}${font :size=8}RAM:${membar 5,70}${color }
${if_match ${cpu}>=40}${color lightsalmon}${endif}${if_match ${cpu}>=75}${color red}${endif}CPU:${cpubar 5,70}
]];
Then comes the ‘processes’ conky with the ‘dimming’ effect…
c2.conky
conky.config = {
-- Conky settings
background = true,
update_interval = 1,
double_buffer = true,
no_buffers = true,
imlib_cache_size = 10,
-- Window specifications #
alignment = 'top_right',
gap_x = 7,
gap_y = 200,
minimum_width = 0, minimum_height = 0,
maximum_width = 160,
own_window = true,
own_window_type = 'dock',
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 180,
own_window_hints = 'below,undecorated,sticky,skip_taskbar,skip_pager',
uppercase = false,
use_spacer = 'none',
use_xft = true,
-- Graphics settings #
draw_shades = false,
default_shade_color = '#484848',
draw_outline = false,
default_outline_color = '#AAAAAA',
draw_borders = false,
draw_graph_borders = true,
default_graph_width = 40, default_graph_height = 80,
show_graph_scale = false,
show_graph_range = false,
-- Text settings #
use_xft = true,
xftalpha = 0,
font = 'noto sans :size=8',
text_buffer_size = 256,
override_utf8_locale = true,
-- Useful shortenings #
short_units = true,
pad_percents = 2,
top_name_width = 30,
color = 'scheme',
-- Color scheme #
default_color = '#999999',
color1 = '#FFFFFF',
color2 = '#25C29C', --manjaro teal
color3 = '#84c2b3', -- pale teal
color4 = '#5f8c81', -- darker teal
color5 = '#DCDCDC', -- pale grey
color6 = '#888888', -- darker grey
color7 = '#e0d9bf', -- buff
color8 = '#659771', -- librarygreen
color9 = '#A9CFF4', --skyblue
total_run_times = 2000,
-- iphone wlp0s20u12
total_run_times = 300,
};
conky.text = [[
\
# Storage
\
${diskiograph /dev/sda 12,30 -t -l}-${diskiograph /dev/sdb 12,30 -t -l}-${diskiograph /dev/sdc 12,30 -t -l}-${diskiograph /dev/sdd 12,30 -t -l}-${diskiograph /dev/sde 12,30 -t -l}
${color}Evo ${goto 25} ${hddtemp /dev/sda}ºC${color gray40} ${goto 60} ${fs_free /}${if_match ${fs_used_perc}>=75}${color lightsalmon}${endif}${if_match ${fs_used_perc}>=85}${color red}${endif}${alignr }${fs_bar 6,55 /}${font }
${color}SD ${goto 25} ${hddtemp /dev/sdb}ºC${color gray40} ${goto 60} ${fs_free /mnt/SSD/}${if_match ${fs_used_perc}>=75}${color lightsalmon}${endif}${if_match ${fs_used_perc}>=85}${color red}${endif}${alignr }${fs_bar 6,55 /mnt/SSD/}${font }${color }
${if_existing /dev/sdd}${color }T4 ${goto 25} ${hddtemp /dev/sdd}ºC ${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,55 /mnt/T4}${font }${color }
${if_existing /dev/sdc}${color }T3 ${goto 25} ${hddtemp /dev/sdc}ºC ${goto 60} ${fs_free /mnt/T3} ${color grey40} ${goto 105}${if_match ${fs_used_perc /mnt/T3}>=85}${color salmon}${endif}${if_match ${fs_used_perc}>=95}${color red}${endif} ${alignr }${fs_bar 6,55 /mnt/T3}${font }${color }
${if_existing /dev/sdd}${color }W2${goto 25} ${hddtemp /dev/sdd}ºC ${goto 60} ${fs_free /mnt/W2} ${color grey40} ${goto 105}${endif}${if_match ${fs_used_perc /mnt/W2}>=85}${color red}${endif} ${alignr }${fs_bar 6,55 /mnt/W2}${endif}${font }${color }
${if_running audacious}
${font mitr:size=10}${alignc }Audacious Playing:
${font mitr:size=12}${alignc }${exec audtool current-song-tuple-data title}
${font mitr:size=12}${alignc }by ${exec audtool current-song-tuple-data artist}
${endif}${color}$hr
${font :bold:size=8}${color }Top Name ${goto 85} CPU MEM ${font }
${color #eeeeee}${top name 1} ${goto 85}${top cpu 1} ${top mem_res 1}
${color #aaaaaa}${top name 2} ${goto 85}${top cpu 2} ${top mem_res 2}
${color #777777}${top name 3} ${goto 85}${top cpu 3} ${top mem_res 3}
${color}$hr
${color }${font :bold:size=8}Top Memory ${goto 85} CPU MEM ${font }
${color #ffffff}${top_mem name 1} ${goto 85} ${top_mem cpu 1} ${top_mem mem_res 1}
${color #dddddd}${top_mem name 2} ${goto 85} ${top_mem cpu 2} ${top_mem mem_res 2}
${color #bbbbbb}${top_mem name 3} ${goto 85} ${top_mem cpu 3} ${top_mem mem_res 3}
${color #999999}${top_mem name 4} ${goto 85} ${top_mem cpu 4} ${top_mem mem_res 4}
${color #666666}${top_mem name 5} ${goto 85} ${top_mem cpu 5} ${top_mem mem_res 5}
$color$hr${font :size=9}${color }
${alignc}${color7}${utime %H%M} GMT]]
I have another one, it’s kind of a sticky note - adjust the timeout to suit. This one only displays for a couple of seconds on mine (more of a splash screen).
c3.conky
conky.config = {
background = true,
double_buffer = true,
no_buffers = true,
update_interval = 2,
imlib_cache_size = 10,
border_width = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_x = true,
-- Window specifications #
alignment = 'bottom_right',
gap_x = 5,
gap_y = 40,
minimum_width = 200, minimum_height = 0,
maximum_width = 300,
own_window = true,
own_window_type = 'dock',
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 200,
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager',
uppercase = false,
use_spacer = 'none',
use_xft = true,
-- Graphics settings #
draw_shades = false,
default_shade_color = '#ffff00',
draw_outline = false,
draw_borders = true,
draw_graph_borders = true,
default_graph_width = 40, default_graph_height = 80,
show_graph_scale = false,
show_graph_range = false,
-- Text settings #
use_xft = true,
xftalpha = 0,
font = 'comfortaa :size=9',
text_buffer_size = 256,
override_utf8_locale = true,
-- Useful shortenings #
short_units = true,
pad_percents = 2,
top_name_width = 30,
-- Color scheme #
own_window_colour = '#e0d9bf',
default_color = '#555555',
color1 = '#366e43', --darker green
total_run_times = 100,
}
conky.text = [[${font :size=9}$color1${execi 5000 cat /etc/lsb-release}
$nodename - $kernel $color $alignr Uptime:$color1 $uptime $color
${execi 5000 plasmashell --version && qmake-qt5 --version}
Load:$color1 $loadavg $color $alignr Frequency (in GHz):$color1 $freq_g $color
Processes:$color1 $processes $color Running:$color1 $running_processes $color $alignr Swap Use:$color1 $swap/$swapmax $color
${font :size=8}$color
${execi 5000 df -h --total /mnt/*}
${alignc }Snapshot:$color1 ${execi 250 ls -r -l /mnt/T3/timeshift/snapshots | sed -n '2p'| cut -c 29-40}
]]
I keep these in my Dropbox folder, together with a general ‘launcher’. The launcher is bound to a mouse gesture (would work with a keyboard shortcut I guess) to toggle. So if you have your conky clock on, but want to see processes you do the script twice (toggles launch conkies/kill conkies).
Conky:
conky.sh
#!/bin/bash
if pgrep -x "conky"
then killall conky
else
conky -d -c ~/Dropbox/conky/c0.conky
conky -d -c ~/Dropbox/conky/c1.conky
conky -d -c ~/Dropbox/conky/c2.conky
conky -d -c ~/Dropbox/conky/c3.conky
conky -d -c ~/Dropbox/conky/c4.conky
fi
So have fun. Maybe install the fonts, or edit them.
Thanks for the tip about three back-tics for code, Ben. I’ve made the change above.
Your code is far more complicated than what I had in mind, but writing your c2.conky to my ~/.config/conky/conky.conf does produce a normal looking dialog without the irritating double spaces. What did you do that my conky.conf and the default conky.conf doesn’t?
I see our font syntax is slightly different, so I changed mine and it still double spaces the output. I don’t see anything more that is fundamentally different between our two .configs, and I still can’t understand why the default install would double space too.
Well differences include:
- Yours has a window with decorations (intentional?)
- Yours has very small fonts that look bad on my screen, hope they’re better on yours
Which parts of the script did you copy over?
Try this:
conky.config = {
-- Conky settings
background = true,
update_interval = 1,
double_buffer = true,
no_buffers = true,
imlib_cache_size = 10,
-- Sampling
diskio_avg_samples = 2,
cpu_avg_samples = 2,
-- Window specifications
gap_x = 7,
gap_y = 90,
minimum_width = 14, minimum_height = 50,
maximum_width = 250,
alignment = 'top_right',
own_window = true,
own_window_type = 'dock',
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 180,
own_window_hints = 'below,undecorated,sticky,skip_taskbar,skip_pager',
border_inner_margin = 0,
border_outer_margin = 0,
draw_shades = false,
default_shade_color = '#484848',
draw_outline = false,
default_outline_color = '#dddddd',
draw_borders = false,
draw_graph_borders = false,
default_graph_width = 40, default_graph_height = 80,
show_graph_scale = true,
show_graph_range = false,
use_xft = true,
xftalpha = 0,
font = 'Droid Sans:size=9',
text_buffer_size = 256,
override_utf8_locale = true,
-- Useful shortenings #
short_units = true,
pad_percents = 2,
top_name_width = 30,
-- Color scheme #
default_color = '#999999',
color1 = '#FFFFFF',
color2 = '#2dcba5',-- teal
color3 = '#16a085',-- teal2
color4 = '#FFFFFF',
color5 = '#DCDCDC',
color6 = '#FFFFFF',
color7 = '#FFFFFF',
color8 = '#A9CFF4',
total_run_times = 1000,
};
conky.text = [[
${color1}Local $time | Up:$color$uptime}
${color1}UTC $utime | Swap $swap}
${color grey}RAM:$color $memperc% ${membar 4} CPU:$color $cpu% ${cpubar 4}
${color grey}CPU:$color $cpu% ${cpubar 4}
${color grey}Files: $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}$hr
${color #16a085}Net Down:$color ${downspeed enp3s0f0} ${color #770000}Net Up:$color ${upspeed enp3s0f0}
${color green}${downspeedgraph enp3s0f0 32,155 green} $alignr${color red}${upspeedgraph enp3s0f0 32,155 red}
${color grey} Name ${goto 100} PID ${goto 160}CPU ${alignr} MEM
${color #888888} ${top name 1} ${goto 90} ${top pid 1} ${goto 160}${top cpu 1} ${alignr}${top mem 1}
${color #666666} ${top name 2} ${goto 90} ${top pid 2} ${goto 160}${top cpu 2} ${alignr}${top mem 2}
${color #555555} ${top name 3} ${goto 90} ${top pid 3} ${goto 160}${top cpu 3} ${alignr}${top mem 3}
${color #444444} ${top name 4} ${goto 90} ${top pid 4} ${goto 160}${top cpu 4} ${alignr}${top mem 4}
]]
Really, just a little more ‘complication’ often makes it work better…
I think my list of top items looks less complicated, memory also in M and I find PID cluttering on conky, easy to pick up in terminal if you’re gonna kill something.
Yours works, mine doesn’t. I tried adding maximum_width to my code as in yours, and mine still double spaces, so that wasn’t a factor.
I’m stumped about what changed on an upgrade, and why even a fresh install would have this annoying effect. But I now have a functional Conky which makes me happy. The question still remains so I can’t say it’s solved, but it’s no longer a problem here. Thanks.
conky -v ─╯
conky 1.11.6_pre compiled Mon Oct 12 08:20:18 PM UTC 2020 for Linux 5.9.0-1-MANJARO x86_64
Compiled in features:
System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky
General:
* math
* hddtemp
* portmon
* IPv6
* Curl
* RSS
* Weather (METAR)
* wireless
* support for IBM/Lenovo notebooks
* nvidia
* builtin default configuration
* old configuration syntax
* Imlib2
* OSS mixer support
* apcupsd
* iostats
* ncurses
* Internationalization support
* PulseAudio
X11:
* Xdamage extension
* Xinerama extension (virtual display)
* Xshape extension (click through)
* XDBE (double buffer extension)
* Xft
* ARGB visual
* Own window
Music detection:
* CMUS
* MPD
* MOC
Default values:
* Netdevice: eno1
* Local configfile: $HOME/.conkyrc
* Localedir: /usr/share/locale
* Maximum netdevices: 256
* Maximum text size: 16384
* Size text buffer: 256