Problem with the '0' character in conky widget

I was modifying my conky on my desktop and I have wanted to display updates’ check and the ‘0’ character looks terrible.
And I do not know what causes this 0 to be like this. If I have updates, every other number is correctly displaying, but 0 cannot. I tried a lot of things, but nothing works.
This is my config file /usr/share/conky/conky_maia:

conky.config = {
	alignment = 'top_right',
	background = true,
	color2 = '5D7B86',
	cpu_avg_samples = 2,
	default_color = 'F9FAF9',
	double_buffer = true,
	font = 'Bitstream Vera Sans:size=10',
	draw_shades = false,
	draw_borders = false,
	gap_x = 25,
	gap_y = 13,
	minimum_width = 200,
	minimum_height = 1060,
	no_buffers = true,
	own_window = true,
	own_window_type = 'override',
	own_window_transparent = true,
	update_interval = 1.0,
	use_xft = true,
	override_utf8_locale = true,
conky.text = [[
${color2}${font Bitstream Vera Sans:bold:size=18}$alignr${execi 10000 awk -F= '/TION/ {print $2}' /etc/lsb-release |sed 's/"//g'} \
${execi 10000 awk -F= '/EASE=/ {printf $2" "} /NAME/ {print $2}' /etc/lsb-release}
$color2${font Bitstream Vera Sans:bold:size=16}CPU$font
$color2${top name 1}$alignr$color${top cpu 1}%
$color2${top name 2}$alignr$color${top cpu 2}%
$color2${top name 3}$alignr$color${top cpu 3}%
$color2${top name 4}$alignr$color${top cpu 4}%
$color2${top name 5}$alignr$color${top cpu 5}%
$color2${font Bitstream Vera Sans:bold:size=16}RAM$font
$color2${top_mem name 1}$alignr$color${top_mem mem_res 1}
$color2${top_mem name 2}$alignr$color${top_mem mem_res 2}
$color2${top_mem name 3}$alignr$color${top_mem mem_res 3}
$color2${top_mem name 4}$alignr$color${top_mem mem_res 4}
$color2${top_mem name 5}$alignr$color${top_mem mem_res 5}
${font Bitstream Vera Sans:bold:size=16}${color2}Swap${font Bitstream Vera Sans:bold:size=16}${color}$alignr${swap}/${swapfree}
${color2}${font}user: ${color}${alignr}${execi 10000 whoami}@${nodename}
${color2}${font}uptime: ${alignr}${color}${uptime_short}
${color2}${font}kernel: ${alignr}${color}${kernel}
${color2}${font}updates: ${alignr}${color}${execi 1000 checkupdates | wc -l}
${color2}${font}installed: ${alignr}${color}${execi 1000 pamac list -i | wc -l}

Um, switch to a different font, maybe?

I switched few times to few different fonts and the result is the same. 0 is cutted in half.

It’s only on that one line — the number of updates — that the character is cut off, and I suspect that it would be the same with any other number on that line, because the “0” looks perfectly fine elsewhere in that screenshot.

It is therefore most likely an alignment bug in that Conky output. I don’t know Conky very well, but I suspect that it uses a script of some sorts to gather and align that information. Perhaps examining the script could bring more clarity. If not, then it would be best to contact the developer because it’s a package that we take over from Arch unmodified.

The developer’s page is here… :arrow_down:

Try to add a space (or maybe 2 ones) in the end of this string in your code:

${color2}${font}updates: ${alignr}${color}${execi 1000 checkupdates | wc -l}

or you can change ‘minimum width’ from 200 to 250 for example

or try this one:
${color2}${font}updates:$alignr$color${execi 1000 checkupdates | wc -l}

Yeah, what scropp13 said :slight_smile:

Or what if you change the line to an actual zero? Like:

${color2}${font}updates: ${alignr}${color} 0

And is it the same with another character? Like:

${color2}${font}updates: ${alignr}${color} 1


Have you tried using this syntax ${color}$swapperc% = $swap/$swapmax

Also remove the font and put it inside config block, since you use the same font for everything.
At the end of the block after override_utf8_locale = true, put font = Bitstream Vera Sans:bold:size=16

Also lower the font size :slight_smile: Isn’t 16px big ?? and give it space.


This is my conky, on laptop screen 1600x900 font = 'Fira Code Medium:size=9' everything visible
and simple :slight_smile:

So. I just wrote just 0 and I saw, if 0 is alone it’s also cutted to the right side in half.

Tried and didn’t work any of this.

I changed to size 9 from 16 and this happened.
P.S. I changed the font, so do not worry about that. And these lines are just glitches when I took screenshot with super+shift+prtsrc

I DID IT :smiley:
I just added ${font} to the line between ${color2}${font}updates: ${alignr}${color} and ${execi 1000 checkupdates | wc -l}.

:ok: At least the zeros look good to me :sweat_smile:

You need to readjust the window size and go with one font size for every thing.
In my conky.conf I only have one size font and no where in the conky.text block I meniton ${font}.

Glad you solved it.


1 Like

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