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.32k stars 619 forks source link

[Bug]: Conky doesn't flush buffers after drawing(?) with own_window_argb_visual and own_window_transparent on Wayland #1723

Open Timarrr opened 9 months ago

Timarrr commented 9 months ago

What happened?

Plasma 6.0 RC2 does this: image Sway doesn't launch these properly, doing the tiling thing, and i'm too lazy to set the windowrules up Niri makes every thread "eat" a core and not even displays any windows

Version

conky 1.19.6_pre compiled 2023-12-22 for Linux x86_64

Which OS/distro are you seeing the problem on?

Arch Linux

Conky config

doesn't work(on the right)

conky.config = {
    background = true,
    font = 'FuraCode Nerd Font:pixelsize=11',
    use_xft = true,
    xftalpha = 1.0,
    update_interval = 1,
    own_window = true,
    own_window_transparent = true,
    own_window_type = 'desktop',
    own_window_class = 'Conky',
    own_window_argb_visual = true,
    own_window_argb_value = 1,
    own_window_colour = '#000',
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    double_buffer = true,
    draw_shades = false,
    draw_outline = false,
    draw_borders = false,
    draw_graph_borders = true,
    stippled_borders = 0,
    border_width = 0,
    default_color = '#BEC8CB',
    default_shade_color = '#BEC8CB',
    default_outline_color = '#BEC8CB',
    alignment = 'top_left',
    gap_x = 680,
    gap_y = 45,
    no_buffers = true,
    cpu_avg_samples = 1,
    net_avg_samples = 1,
    use_spacer = 'none',
    uppercase = true,
    minimum_width = 1024,
    minimum_height = 640,
    default_bar_width=100,
    default_bar_height=7,
};

conky.text = [[

#leet chars: ┤┤└ └ ┴ ┴ ┐┐│ │┘ ┘┌ ┌ ├ ├ ┬ ┬ ┼ ┼ ┴ ┴ ── ││ ▽▼△▲▵▴▾▿
# x5 ─────
# Computer Info
${alignr 5}Huawei Matebook D16 --- ${uid_name 1000}@${nodename} :   host ${offset 2}─┬────────────────
${alignr 115}│
${alignr 115}${kernel} : kernel ─┤
${alignr 115}${execi 600 lsb_release -ds | sed 's/"//g'} : distro ─┤
${alignr 115}${exec uptime | awk -F, '{print $1}' | awk '{gsub(/^ +| +$/,"")}1' } : uptime ─┘

# Graphics Info
${alignr 36}Radeon R7 M365X @ 0.825 GHz :   gpu ─┬───────────
${alignr 113}│
${alignr 113}${execp ./scripts/gpu-stats vram } :  vram ─┤
${alignr 113}${execp ./scripts/gpu-stats clock } : clock ─┘

${alignr 36}${execi 600 cat /etc/default/locale | grep "LANG=" | cut -d"\"" -f2 | sed 's/LANG=//g'} : locale ────────────┐
${voffset 5}
${alignr 125}┌──────────────────────────────────────────┐
${alignr 125}│  ${execi 3600 cat /proc/cpuinfo | grep 'model name'| sed -e 's/model name.*: //'| uniq | sed 's/(R)//g'|sed 's/(TM)//g' | sed 's/CPU     //g'}  │
${alignr 125}├- -  --  --  --  --  --  --  --  --  --  -┤
${alignr 125}│    core0 <${exec sensors | grep 'Core 0'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°C>  core1 <${exec sensors | grep 'Core 1'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°C>   │
${alignr 125}├──────────────────────────────────────────┤
${alignr 125}│ processes - ${exec printf "%-5s" $(ps -e --no-headers | wc -l)}    <${exec hwinfo --cpu | grep Clock | grep -oE '[0-9]+' | awk '{ sum += $1 } END { avg = sum / NR / 1000; printf "%4.2f GHz\n", avg }'}> │
${alignr 125}├- --  --  --  --  -- --  --  --  --  --  -┤
${alignr 125}├─ p1 <${top name 1}   ${top cpu 1}>          │
${alignr 125}├─ p2 <${top name 2}   ${top cpu 2}>          │
${alignr 125}├─ p3 <${top name 3}   ${top cpu 3}>          │
${alignr 125}├─ p4 <${top name 4}   ${top cpu 4}>          │
${alignr 125}├─ p5 <${top name 5}   ${top cpu 5}>          │
${alignr 125}└─────────────────┬────────────────────────┘
${alignr 97}${execpi 5 ./scripts/fanspeed } : fan ─────────────────────┴─────── cpu ────────
${voffset 0}
${alignr 75}$swap / $swapmax ${swapperc}% swap --- $mem / $memmax | $memperc% ${membar 7,100} ───── ram ────┐
${voffset 31}
${alignr 78}${execi 30 bash ./scripts/network.bash ip } - ${execi 30 bash ./scripts/network.bash } : interface ─┬─── network ─────
${alignr 197}│
${alignr 197}${execi 30 bash ./scripts/network.bash dns } :       dns ─┤
${alignr 197}${execi 30 bash ./scripts/network.bash gtw } :   gateway ─┘
${voffset -13}
#${offset 325}${upspeedgraph wlp2s0 50,130 BCC3C3 BCC3C3} ${downspeedgraph wlp2s0 50,130 BCC3C3 BCC3C3}
#${offset 385}UP                ${offset -2} DOWN
${voffset 11}
${alignr 101}${execi 60 acpi | grep "Battery 0" | tr -d ',' } ${battery_bar 7,100 BAT0} ──── bat ────
${voffset 23}
${alignr 5}${execi 3600 bash ./scripts/storage.sh val / } ${execibar 3600 bash ./scripts/storage.sh perc / } : SanDisk SD8SN8U-256G-1006 ─┬───── strg ────────
${alignr 138}${execi 3600 bash ./scripts/storage.sh val /mnt/9275c84f-279a-4dd7-b9fd-dca73b6df9a6/ } ${execibar 3600 bash ./scripts/storage.sh perc /mnt/9275c84f-279a-4dd7-b9fd-dca73b6df9a6/ } :   Hitachi HTS543232A7A384 ─┘
]];

"working" but unable to overlay windows for obvious reasons(on the left)

conky.config = {
    background = true,
    font = 'FuraCode Nerd Font:pixelsize=11',
    use_xft = true,
    xftalpha = 1.0,
    update_interval = 1,
    own_window = true,
    own_window_transparent = true,
    own_window_type = 'desktop',
    own_window_class = 'Conky',
    own_window_argb_visual = true,
    own_window_argb_value = 1,
    own_window_colour = '#000',
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    double_buffer = true,
    draw_shades = false,
    draw_outline = false,
    draw_borders = false,
    draw_graph_borders = true,
    stippled_borders = 0,
    border_width = 0,
    default_color = '#BEC8CB',
    default_shade_color = '#BEC8CB',
    default_outline_color = '#BEC8CB',
    alignment = 'top_left',
    gap_x = 680,
    gap_y = 45,
    no_buffers = true,
    cpu_avg_samples = 1,
    net_avg_samples = 1,
    use_spacer = 'none',
    uppercase = true,
    minimum_width = 1024,
    minimum_height = 640,
    default_bar_width=100,
    default_bar_height=7,
};

conky.text = [[

#leet chars: ┤┤└ └ ┴ ┴ ┐┐│ │┘ ┘┌ ┌ ├ ├ ┬ ┬ ┼ ┼ ┴ ┴ ── ││ ▽▼△▲▵▴▾▿
# x5 ─────
# Computer Info
${alignr 5}Huawei Matebook D16 --- ${uid_name 1000}@${nodename} :   host ${offset 2}─┬────────────────
${alignr 115}│
${alignr 115}${kernel} : kernel ─┤
${alignr 115}${execi 600 lsb_release -ds | sed 's/"//g'} : distro ─┤
${alignr 115}${exec uptime | awk -F, '{print $1}' | awk '{gsub(/^ +| +$/,"")}1' } : uptime ─┘

# Graphics Info
${alignr 36}Radeon R7 M365X @ 0.825 GHz :   gpu ─┬───────────
${alignr 113}│
${alignr 113}${execp ./scripts/gpu-stats vram } :  vram ─┤
${alignr 113}${execp ./scripts/gpu-stats clock } : clock ─┘

${alignr 36}${execi 600 cat /etc/default/locale | grep "LANG=" | cut -d"\"" -f2 | sed 's/LANG=//g'} : locale ────────────┐
${voffset 5}
${alignr 125}┌──────────────────────────────────────────┐
${alignr 125}│  ${execi 3600 cat /proc/cpuinfo | grep 'model name'| sed -e 's/model name.*: //'| uniq | sed 's/(R)//g'|sed 's/(TM)//g' | sed 's/CPU     //g'}  │
${alignr 125}├- -  --  --  --  --  --  --  --  --  --  -┤
${alignr 125}│    core0 <${exec sensors | grep 'Core 0'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°C>  core1 <${exec sensors | grep 'Core 1'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°C>   │
${alignr 125}├──────────────────────────────────────────┤
${alignr 125}│ processes - ${exec printf "%-5s" $(ps -e --no-headers | wc -l)}    <${exec hwinfo --cpu | grep Clock | grep -oE '[0-9]+' | awk '{ sum += $1 } END { avg = sum / NR / 1000; printf "%4.2f GHz\n", avg }'}> │
${alignr 125}├- --  --  --  --  -- --  --  --  --  --  -┤
${alignr 125}├─ p1 <${top name 1}   ${top cpu 1}>          │
${alignr 125}├─ p2 <${top name 2}   ${top cpu 2}>          │
${alignr 125}├─ p3 <${top name 3}   ${top cpu 3}>          │
${alignr 125}├─ p4 <${top name 4}   ${top cpu 4}>          │
${alignr 125}├─ p5 <${top name 5}   ${top cpu 5}>          │
${alignr 125}└─────────────────┬────────────────────────┘
${alignr 97}${execpi 5 ./scripts/fanspeed } : fan ─────────────────────┴─────── cpu ────────
${voffset 0}
${alignr 75}$swap / $swapmax ${swapperc}% swap --- $mem / $memmax | $memperc% ${membar 7,100} ───── ram ────┐
${voffset 31}
${alignr 78}${execi 30 bash ./scripts/network.bash ip } - ${execi 30 bash ./scripts/network.bash } : interface ─┬─── network ─────
${alignr 197}│
${alignr 197}${execi 30 bash ./scripts/network.bash dns } :       dns ─┤
${alignr 197}${execi 30 bash ./scripts/network.bash gtw } :   gateway ─┘
${voffset -13}
#${offset 325}${upspeedgraph wlp2s0 50,130 BCC3C3 BCC3C3} ${downspeedgraph wlp2s0 50,130 BCC3C3 BCC3C3}
#${offset 385}UP                ${offset -2} DOWN
${voffset 11}
${alignr 101}${execi 60 acpi | grep "Battery 0" | tr -d ',' } ${battery_bar 7,100 BAT0} ──── bat ────
${voffset 23}
${alignr 5}${execi 3600 bash ./scripts/storage.sh val / } ${execibar 3600 bash ./scripts/storage.sh perc / } : SanDisk SD8SN8U-256G-1006 ─┬───── strg ────────
${alignr 138}${execi 3600 bash ./scripts/storage.sh val /mnt/9275c84f-279a-4dd7-b9fd-dca73b6df9a6/ } ${execibar 3600 bash ./scripts/storage.sh perc /mnt/9275c84f-279a-4dd7-b9fd-dca73b6df9a6/ } :   Hitachi HTS543232A7A384 ─┘
]];

Stack trace

No response

Relevant log output

No response

Caellian commented 7 months ago

own_window_argb_visual should be true by default and ignored on Wayland as per spec, argb8888 should be supported by all renderers.

Caellian commented 7 months ago

@Timarrr Do you mind explaining a bit better what's wrong? Both configs you provided are identical and you claim one works while the other doesn't.

Sway doesn't launch these properly, doing the tiling thing, and i'm too lazy to set the windowrules up Niri makes every thread "eat" a core and not even displays any windows

Your description and image only tells me that "these" aren't working, but I don't know what "these" are...

set_transparent = false,
background_colour = "#222244",
own_window_argb_value = 128,

should give a transparent background. As I previously stated own_window_argb_visual is ignored (all wayland WMs are expected to support argb8888 format afaik).