leftwm icon indicating copy to clipboard operation
leftwm copied to clipboard

Reserved space for `polybar` not calculated correct on auto configured tripple monitor setup

Open 10leej opened this issue 3 years ago • 15 comments

It seems like the right most monitor the windows don't respect polybar. I'm using mostly the default theme config with mostly keybindings being set (60% keyboard with dvorak keybindings). Curious if this is a bug or if it's a mistake on my part.

1644560683

here's my config

10leej avatar Feb 11 '22 06:02 10leej

:thinking: your config and theme looks alright to me. Could you check how the xprop outputs of you three bars differ?

As a workaround you could try to add a gutter to your theme.toml.

VuiMuich avatar Feb 11 '22 07:02 VuiMuich

right most screen (github's code tagging won't format these lines properly)

joshua@desktop-10:07AM:~$ xprop
_NET_WM_PID(CARDINAL) = 16815
_NET_WM_DESKTOP(CARDINAL) = 2
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
WM_CLASS(STRING) = "polybar", "Polybar"
WM_NAME(STRING) = "polybar-mainbar2_DisplayPort-1"
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 27, 0, 0, 0, 0, 0, 3840, 9599, 0, 0
_NET_WM_STRUT(CARDINAL) = 0, 0, 27, 0  

center screen

joshua@desktop-10:07AM:~$ xprop  
_NET_WM_PID(CARDINAL) = 16814  
_NET_WM_DESKTOP(CARDINAL) = 2  
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE  
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK  
WM_CLASS(STRING) = "polybar", "Polybar"  
WM_NAME(STRING) = "polybar-mainbar1_DisplayPort-1"  
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 27, 0, 0, 0, 0, 0, 1920, 5759, 0, 0  
_NET_WM_STRUT(CARDINAL) = 0, 0, 27, 0  

left screen

joshua@desktop-10:08AM:~$ xprop  
_NET_WM_PID(CARDINAL) = 16813  
_NET_WM_DESKTOP(CARDINAL) = 2  
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE  
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK  
WM_CLASS(STRING) = "polybar", "Polybar"  
WM_NAME(STRING) = "polybar-mainbar0_DisplayPort-1"  
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 27, 0, 0, 0, 0, 0, 0, 1919, 0, 0  
_NET_WM_STRUT(CARDINAL) = 0, 0, 27, 0  

I'm go go ahead and add a gutter since I didn't think of that yet.

10leej avatar Feb 11 '22 15:02 10leej

Do I get this right, that your left and center are FHD, and your right is UHD?

If that's the case the issue might be, that polybar is reserving to few space. Maybe doing some math in the sizes.liquid might work out. Or defining gutters by workspace IDs, which would also require to manually configure workspaces in config.toml, if memory serves right.

regarding the code formatting have you tried it with tripple backticks ``` for codeblocks? This should work correct.

VuiMuich avatar Feb 11 '22 16:02 VuiMuich

their all 1920x1080

this fix works for me

10leej avatar Feb 11 '22 16:02 10leej

Ohh, I smh got confused by the 3840 in the strut :see_no_evil:

So we might actually have a bug when autoconfiguring more then two workspaces... :thinking:

VuiMuich avatar Feb 11 '22 16:02 VuiMuich

That's what lead me to file the bug. That said it's a pretty rare use case overall

10leej avatar Feb 11 '22 16:02 10leej

So with the gutter workaround it seems that polybar despawns when not on the first 3 tags. Is this related, a seperate bug, or expected behaviour? I have no knowledge of polybar configuration.

10leej avatar Feb 12 '22 23:02 10leej

Can you post your workspace section from your config.toml and your theme.toml? This might indeed be a separate bug.

VuiMuich avatar Feb 13 '22 07:02 VuiMuich

after researching it I determined it to be a seperate issue as I had a rogue youtube video open in fullscreen in a different tag.

10leej avatar Feb 13 '22 07:02 10leej

Is still an issue right? Sounds oddly similar to #780

hertg avatar Sep 04 '22 12:09 hertg

Same issue here...

patrikha avatar Oct 04 '22 19:10 patrikha

Just a few questions because it fixes itself for me: What is your screen configuration? (Please post xrandr output)

I think it was something with my primary screen being on the left side.

Eskaan avatar Oct 04 '22 20:10 Eskaan

Same thing here, primary screen on the left of the screen with wrong gutter for polybar

Screen 0: minimum 8 x 8, current 6240 x 2160, maximum 32767 x 32767
DP-0 connected primary 3840x2160+1200+0 (normal left inverted right x axis y axis) 700mm x 390mm
   3840x2160     60.00*+  30.00    29.97
   2560x1440     59.95
   1920x1080     60.00    59.94
   1680x1050     59.95
   1600x900      60.00
   1440x900      59.89
   1280x1024     75.02    60.02
   1280x800      59.81
   1280x720      60.00
   1152x864      75.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32    56.25
   640x480       75.00    72.81    59.94
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 1200x1920+5040+77 left (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    59.94    59.93    50.00
   1680x1050     59.95
   1600x1200     60.00
   1440x900      59.89
   1280x1024     75.02    60.02
   1280x800      59.81
   1280x720      60.00    59.94    50.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32
   720x576       50.00
   720x480       59.94
   640x480       75.00    72.81    59.94    59.93
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected 1200x1920+0+77 left (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    59.94    59.93    50.00
   1680x1050     59.95
   1600x1200     60.00
   1440x900      59.89
   1280x1024     75.02    60.02
   1280x800      59.81
   1280x720      60.00    59.94    50.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32
   720x576       50.00
   720x480       59.94
   640x480       75.00    72.81    59.94    59.93
DP-5 disconnected (normal left inverted right x axis y axis)

patrikha avatar Oct 05 '22 07:10 patrikha

You might try making your most right screen the primary, would be very interesting if that worked.

Eskaan avatar Oct 05 '22 12:10 Eskaan

Yes that works.

patrikha avatar Oct 05 '22 13:10 patrikha