bspwm
bspwm copied to clipboard
Weird floating window positioning
I have two monitors- eDP-1 (2560x1440) and DP-1 (3840x2160), arranged with:
xrandr --output eDP-1 --pos 0x720 --auto --output DP-1 --pos 2560x0 --auto
That is, the bottom edges are aligned, and DP-1 is to the right of eDP-1 (the right edge of eDP-1 touches the left edge of DP-1).
If I specify either rectangle=1078x560+0+0
or rectangle=1078x560+2560+0
for a particular floating window, the window appears in the top left corner of the second monitor.
If I specify rectangle=1078x560+1920+0
(half the width of the second monitor), the window appears in the second monitor, but at the equivalent of what the 1920 position would be in the first monitor, so much farther than the middle.
If I specify rectangle=1078x560+30+0
, the window aligns with a 30 pixel gap in the first monitor, but not in the second monitor.
I don't really understand what's going on here - is there good documentation on how window positioning works somewhere?
Playing around with this more, it looks like the absolute coordinates (in terms of the total screen size, both monitors added) work how I want. I guess the smaller numbers correspond to some relative or scaled placement?
If I specify either rectangle=1078x560+0+0 or rectangle=1078x560+2560+0 for a particular floating window, the window appears in the top left corner of the second monitor.
the window will appear on the monitor/desktop/node set by the rule, regardless of rectangle. if there are none set then focus is used to determine monitor.
also, once you go past the max geometry for the monitor you can start getting some weird results.