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.16k stars 615 forks source link

[Bug]: own_window_type = 'panel' breaks window positioning #1917

Open brrrrrrrt opened 4 months ago

brrrrrrrt commented 4 months ago

What happened?

i use two monitors.

conky window type is set to panel an positioned on the left side of the right monitor.

After Upgrading to 1.20 the window placement is "broken" when using the window type "panel". once conky is started, all active windows move from the left to the right monitor and i am not able to move them all the way to the left on the left monitor, like some invisible barrier. the mouse can be moved freely on all monitors, but the windows cannot be moved all the way to the left.

downgrading to 1.19 solves the problem.

window type desktop works, this is how it should look like: Bildschirmfoto vom 2024-05-15 14-47-03

after setting window type to "panel" it looks like this: Bildschirmfoto vom 2024-05-15 14-47-28

windows cannot be moved all the way to the left, it stops at this position: Bildschirmfoto vom 2024-05-15 14-48-01

Version

1.20.2_pre

Which OS/distro are you seeing the problem on?

Arch Linux

Conky config

-- vim: ts=4 sw=4 noet ai cindent syntax=lua

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2, 
    default_color = '606060',
    default_outline_color = 'white',
    default_shade_color = 'black',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    gap_x = 1921,
    gap_y = 20,
    minimum_height = 10,
    minimum_width = 330,
    maximum_width = 330,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_transparent = true,
    own_window_argb_visual = true,
    own_window_type = 'panel',
    own_window_hints = 'below',
    short_units = true,
    stippled_borders = 2,
    update_interval = 1.5,
    uppercase = false,
    use_spacer = 'right',
    show_graph_scale = false,
    show_graph_range = false,
    use_xft = true,
    font = 'Bitstream Vera Sans Mono:size=9',
    xftalpha = 0.8,
    text_buffer_size = 1024,
    max_user_text = 65536,
    default_gauge_width = 20,
    default_gauge_height = 35,
    color0 = '808080',
    color1 = '617d40',
    color2 = '7f803c',
    color3 = 'ff0000',
}

conky.text = [[
${alignc -10}${font Blade Runner Movie Font:size=20}${color 1793d1}Arch${color}linux$font$color
${image /home/brt/Bilder/Archlinux-icon-crystal-64.svg.png -p 45,0 -s 32x32}
$alignc${color}brt@$nodename  $sysname $kernel $machine ${alignr}$color
${color0}Up:$color $uptime $alignr${color0}LA: $color$loadavg   $alignr${font Bitstream Vera Sans Mono:size=16}${time %H:%M}$font
${color0}${execi 60 cat /proc/cpuinfo |grep model.name| uniq | sed 's/model.name.*://'|sed 's/(.*)//g'|sed 's/^ //'} $alignr$color $freq_g GHz
${if_match ${cpu cpu0}<=60}${color1}${endif}${if_match ${cpu cpu0}>60}${color2}${endif}${if_match ${cpu cpu0}>80}${color3}${endif}${cpugauge cpu0 20,35}${offset 14}\
${if_match ${cpu cpu1}<=60}${color1}${endif}${if_match ${cpu cpu1}>60}${color2}${endif}${if_match ${cpu cpu1}>80}${color3}${endif}${cpugauge cpu1 20,35}${offset 14}\
${if_match ${cpu cpu2}<=60}${color1}${endif}${if_match ${cpu cpu2}>60}${color2}${endif}${if_match ${cpu cpu2}>80}${color3}${endif}${cpugauge cpu2 20,35}${offset 14}\
${if_match ${cpu cpu3}<=60}${color1}${endif}${if_match ${cpu cpu3}>60}${color2}${endif}${if_match ${cpu cpu3}>80}${color3}${endif}${cpugauge cpu3 20,35}${offset 14}\
${if_match ${cpu cpu4}<=60}${color1}${endif}${if_match ${cpu cpu4}>60}${color2}${endif}${if_match ${cpu cpu4}>80}${color3}${endif}${cpugauge cpu4 20,35}${offset 14}\
${if_match ${cpu cpu5}<=60}${color1}${endif}${if_match ${cpu cpu5}>60}${color2}${endif}${if_match ${cpu cpu5}>80}${color3}${endif}${cpugauge cpu5 20,35}${offset 14}\
${if_match ${cpu cpu6}<=60}${color1}${endif}${if_match ${cpu cpu6}>60}${color2}${endif}${if_match ${cpu cpu6}>80}${color3}${endif}${cpugauge cpu6 20,35}
${voffset -5}${alignr 299}${if_match ${cpu cpu0}<=60}${color1}${endif}${if_match ${cpu cpu0}>60}${color2}${endif}${if_match ${cpu cpu0}>80}${color3}${endif}${cpu cpu0}%
${voffset -15}${if_match ${cpu cpu1}<=60}${color1}${endif}${if_match ${cpu cpu1}>60}${color2}${endif}${if_match ${cpu cpu1}>80}${color3}${endif}${alignr 250}${cpu cpu1}%
${voffset -15}${if_match ${cpu cpu2}<=60}${color1}${endif}${if_match ${cpu cpu2}>60}${color2}${endif}${if_match ${cpu cpu2}>80}${color3}${endif}${alignr 201}${cpu cpu2}%
${voffset -15}${if_match ${cpu cpu3}<=60}${color1}${endif}${if_match ${cpu cpu3}>60}${color2}${endif}${if_match ${cpu cpu3}>80}${color3}${endif}${alignr 152}${cpu cpu3}%
${voffset -15}${if_match ${cpu cpu4}<=60}${color1}${endif}${if_match ${cpu cpu4}>60}${color2}${endif}${if_match ${cpu cpu4}>80}${color3}${endif}${alignr 103}${cpu cpu4}%
${voffset -15}${if_match ${cpu cpu5}<=60}${color1}${endif}${if_match ${cpu cpu5}>60}${color2}${endif}${if_match ${cpu cpu5}>80}${color3}${endif}${alignr 54}${cpu cpu5}%
${voffset -15}${if_match ${cpu cpu6}<=60}${color1}${endif}${if_match ${cpu cpu6}>60}${color2}${endif}${if_match ${cpu cpu6}>80}${color3}${endif}${alignr 5}${cpu cpu6}%
${color0}${cpugraph cpu0 25,330 808080 c5ff00 -t -l}
${voffset -7}${offset 3}\
${cpugraph cpu1 25,50 808080 c5ff00 -t}${offset 5}\
${cpugraph cpu2 25,50 808080 c5ff00 -t}${offset 5}\
${cpugraph cpu3 25,50 808080 c5ff00 -t}${offset 5}\
${cpugraph cpu4 25,50 808080 c5ff00 -t}${offset 5}\
${cpugraph cpu5 25,50 808080 c5ff00 -t}${offset 5}\
${cpugraph cpu6 25,50 808080 c5ff00 -t}
${loadgraph 25,330 808080 c5ff00 -t}
${color0}RAM Usage: $mem/$memmax $alignr ${if_match $memperc<=60}${color1}${endif}${if_match $memperc>60}${color2}${endif}${if_match $memperc>80}${color3}${endif} $memperc% ${membar  5,100}
${color0}Swap Usage: $swap/$swapmax $alignr ${if_match $swapperc==0}${color1}${endif}${if_match $swapperc>0}${color2}${endif}${if_match $swapperc>50}${color3}${endif}$swapperc% ${swapbar 5,100}
${color0}Prozesse:$color $processes  ${color0}aktiv:$color $running_processes 
${color0}Temperaturen:${alignr}MB:\
${if_match ${hwmon 0 temp 2}<=35}${color1}${endif}\
${if_match ${hwmon 0 temp 2}>35}${color2}${endif}\
${if_match ${hwmon 0 temp 2}>40}${color3}${endif}\
${hwmon 0 temp 2}${goto 160}°C  ${color0}CPUs:\
${if_match ${hwmon 0 temp 1}<=35}${color1}${endif}\
${if_match ${hwmon 0 temp 1}>35}${color2}${endif}\
${if_match ${hwmon 0 temp 1}>40}${color3}${endif}\
${hwmon 0 temp 1}${goto 238}°C  ${alignr}${color0}GPU:\
${if_match ${execi 5 nvidia-temp}<=45}${color1}${endif}\
${if_match ${execi 5 nvidia-temp}>45}${color2}${endif}\
${if_match ${execi 5 nvidia-temp}>60}${color3}${endif}\
${execi 5 nvidia-temp}°C
${color0}NVIDIA Driver Version: ${execi 3600 find /usr/lib/modules/$(uname -r) -name "nvidia.ko*" -exec modinfo {} \; | grep ^version | awk '{print($2)}'}
${color0}Entropy: ${color}${entropy_avail}${color0}/${color}${entropy_poolsize} ${if_match $entropy_avail<256}${color1}${endif}${if_match $entropy_avail<128}${color2}${endif}${if_match $entropy_avail<64}${color3}${endif}${entropy_bar}

${color0}enp0s31f6: $alignr${addrs enp0s31f6}
${color0}Net Down:$color ${downspeed enp0s31f6} $alignr${color0}Net Up:$color ${upspeed enp0s31f6}
${color0}downloaded:$color ${totaldown enp0s31f6}$alignr${color0}uploaded:$color ${totalup enp0s31f6}
${color0}${downspeedgraph enp0s31f6 25,155 808080 62be54 -t} $alignr${color0}${upspeedgraph enp0s31f6 25,155 808080 4087bf -t}

${color0}Dateisysteme: ${color}(frei/gesamt)
 ${color0}/ $color${alignr}${fs_free /}/${fs_size /}  ${if_match ${fs_used_perc /}<=60}${color1}${endif}${if_match ${fs_used_perc /}>60}${color2}${endif}${if_match ${fs_used_perc /}>80}${color3}${endif}${fs_used_perc /}% ${goto 214}${fs_bar 5,120 /}
 ${color0}/home $color${alignr}${fs_free /home}/${fs_size /home} ${if_match ${fs_used_perc /home}<=60}${color1}${endif}${if_match ${fs_used_perc /home}>60}${color2}${endif}${if_match ${fs_used_perc /home}>80}${color3}${endif}${fs_used_perc /home}% ${goto 214}${fs_bar 5,120 /home}
 ${color0}/tmp $color${alignr}${fs_free /tmp}/${fs_size /tmp}   ${if_match ${fs_used_perc /tmp}<=60}${color1}${endif}${if_match ${fs_used_perc /tmp}>60}${color2}${endif}${if_match ${fs_used_perc /tmp}>80}${color3}${endif}${fs_used_perc /tmp}% ${goto 214}${fs_bar 5,120 /tmp}
 ${if_mounted /net/Mohoga}${color0}/net/Mohoga $color${fs_free /net/Mohoga}/${fs_size /net/Mohoga}${goto 186}${if_match ${fs_used_perc /net/Mohoga}<=85}${color1}${endif}${if_match ${fs_used_perc /net/Mohoga}>85}${color2}${endif}${if_match ${fs_used_perc /net/Mohoga}>90}${color3}${endif}${fs_used_perc /net/Mohoga}% ${goto 214}${fs_bar 5,120 /net/Mohoga} $endif
 ${if_mounted /mnt}${color0}/mnt        $color${fs_free /mnt}/${fs_size /mnt}${goto 186}${if_match ${fs_used_perc /mnt}<=85}${color1}${endif}${if_match ${fs_used_perc /mnt}>85}${color2}${endif}${if_match ${fs_used_perc /mnt}>90}${color3}${endif}${fs_used_perc /mnt}% ${goto 214}${fs_bar 5,120 /mnt} $endif
${color0} Disk IO: ${diskio} ${ioscheduler sda}
#${diskiograph 15,330 808080 fce94f -t}
${color0} Read: ${diskio_read} $alignr Write: ${diskio_write}
${diskiograph_read 25,160 808080 8ae234 -t} $alignr${diskiograph_write 25,160 808080 ef2929 -t}
${color0}Top                PID   CPU%   MEM% 
 $color${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
 $color${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
 $color${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
 $color${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}

${color0}Mem usage
 $color${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
 $color${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
 $color${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
 $color${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4} 

${color0}${apcupsd 192.168.23.1 3551} ${apcupsd_name} ${apcupsd_model} ${apcupsd_upsmode} 
 ${color0}Load: ${alignr}${if_match ${apcupsd_load}<=30}${color1}${endif}${if_match ${apcupsd_load}>30}${color2}${endif}${if_match ${apcupsd_load}>60}${color3}${endif}${apcupsd_load}% ${apcupsd_loadbar 5,200}
 ${color0}Input: \
${color1}\
${if_match ${apcupsd_linev}>233}${color2}${endif}\
${if_match ${apcupsd_linev}>235}${color3}${endif}\
${if_match ${apcupsd_linev}<228}${color2}${endif}\
${if_match ${apcupsd_linev}<222}${color3}${endif}\
${apcupsd_linev}V \
${alignc}${color} Charge: \
${color1}\
${if_match ${apcupsd_charge}<100}${color2}${endif}\
${if_match ${apcupsd_charge}<50}${color3}${endif}\
${apcupsd_charge}% \
${alignr}${color}Time Left: \
${color1}\
${if_match ${apcupsd_timeleft}<40}${color2}${endif}\
${if_match ${apcupsd_timeleft}<30}${color3}${endif}\
${apcupsd_timeleft}m

${color bf4040}${scroll 50 3 ${curl https://sendersupport.olc.protection.outlook.com/snds/ipStatus.aspx?key=3714f3c3-b1e0-acfc-b991-abd06c6ce23c 360}}

$color$stippled_hr
$alignc$color conky $conky_build_arch $conky_version

#
]];

Stack trace

No response

Relevant log output

No response

Caellian commented 4 months ago

Hi, can you build fix/bad-struts branch and let me know whether it fixes this issue? I can't test locally because I don't have multiple monitors.

git clone -b fix/bad-struts https://github.com/brndnmtthws/conky.git
cd conky
cmake -S . -B build --fresh
cmake --build build
cmake --install build

The issue is caused by set_struts function in x11.cc and changes I did to it in last few commits:

brrrrrrrt commented 4 months ago

thx! :)

i tried the fix/bad-struts branch, "something changed on the issue", now the top panel looks fixed, but the dock on the left moved and the active window is "squeezed" to the bottom of the left monitor and if i want to move a window gnome tries to squeeze that window also to the bottom on the left monitor, see attached screenshot. Bildschirmfoto vom 2024-05-16 12-11-59

DarNCelsius commented 3 months ago

I had the same issue. 1.19.8 works as expected - 1.21.2 broke window positioning. 1.21.3 doesn't seem to reserve any space at all with 'panel' set.

brrrrrrrt commented 1 month ago

just tried 1.21.5 - it behaves exactly like window type desktop, no "panel-space" is reserved at all, maximized windows use the whole monitor

*edit - same with 1.21.6

internauta2000 commented 1 month ago

Acabo de probar 1.21.5: se comporta exactamente como un escritorio tipo ventana, no se reserva ningún "espacio de panel", las ventanas maximizadas usan todo el monitor

*editar - lo mismo con 1.21.6

Please solve this bug..!