brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

pad_percents issues...again #1132

Closed ajgringo619 closed 1 year ago

ajgringo619 commented 3 years ago

Issue

For the life of me, I cannot get pad_percents to make any difference on whatever percentage call I'm making.

Information

Here's my conky.conf:

conky.config = {
    -- Window settings --
    gap_x = 5,
    gap_y = 1,
    minimum_height = 200,
    minimum_width = 1910,
    own_window = true,
    own_window_argb_visual = true,
    own_window_argb_value = 0,
    own_window_class = 'Conky2',
    own_window_colour ='020202',
    own_window_hints = 'skip_taskbar,undecorated',
    own_window_title = 'testing',
    own_window_type = 'normal',
    xinerama_head = 1,

    -- Color, fonts --
    color1 = 'cyan',
    color2 = 'yellow',
    color3 = 'green',
    default_color = 'white',
    font = 'Ubuntu Mono:size=12',
    use_xft = true,

    -- Formatting --
    alignment = 'tl',
    background = false,
    border_width = 1,
    draw_borders = false,
    draw_graph_borders = false,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    format_human_readable = yes,
    pad_percents = 2,
    use_spacer = 'none',

    -- Other settings --
    cpu_avg_samples = 2,
    double_buffer = true,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    short_units = true,
    update_interval = 2.0,
    uppercase = false,

    -- Templates --
    -- Top processes --
    template0 = [[${top pid \1}${goto 75}${top name \1}${goto 225}${pid_exe ${top pid \1}}${goto 550}${top user \1}${goto 650}${top cpu \1}${goto 725}${top mem \1}]]
};

conky.text = [[
${font Ubuntu Mono:bold:size=12}${color1}  PID${goto 75}Name${goto 225}Program Path${goto 550}User${goto 650}  CPU%${goto 725}  MEM%${font}${color}
${template0 1}
${template0 2}
${template0 3}
${template0 4}
${template0 5}
${template0 6}
${template0 7}
${template0 8}
${template0 9}
${template0 10}
${goto 650}${cpu cpu0}%${goto 725}${memperc}%
]]

The ${top cpu} and ${top mem} are showing 2 decimal places, but that doesn't change regardless of the pad_percents setting. Also, ${cpu cpu0} and ${memperc} always show no decimal places. I know this used to work, but I haven't tried Conky in a few years.

This can't be this difficult...can it?

kistlin commented 2 years ago

You have use_spacer set to 'none'. I think this doesn't add padding. Try 'left' or 'right' for use_spacer.

I was debugging a similar issue, but my mistake was not putting a quote ' or " around the value of use_spacer and therefore got no padding.

Example

use_spacer = left,

leads to the same as

use_spacer = 'none',

which does not add padding, correct would be

use_spacer = 'left',
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.