polybar / polybar

A fast and easy-to-use status bar
https://polybar.github.io
MIT License
14.06k stars 702 forks source link

polybar+openbox strut issue #212

Closed edgard closed 7 years ago

edgard commented 7 years ago

Hi Michael,

I'm trying to get polybar to behave with openbox but it seems to have a strut issue. If I set it to dock = false, the tray is placed on the correct position and strut seems to be working but the bar itself is being positioned on the center of screen.

Like this: https://u.teknik.io/Us6W3.png

Any tips?

jaagr commented 7 years ago

Hi,

Could you post the output of xdo id -n polybar | xargs -I % xprop -id %

edgard commented 7 years ago

There you go:

[edgard:scripts]$ xdo id -n polybar | xargs -I % xprop -id %
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_BELOW
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 0, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
_NET_WM_ICON(CARDINAL) =    Icon (48 x 48):
[giant ascii]
_OB_APP_TYPE(UTF8_STRING) = "dock"
_OB_APP_TITLE(UTF8_STRING) = "polybar-primary_DVI-I-1"
_OB_APP_GROUP_CLASS(UTF8_STRING) = 
_OB_APP_GROUP_NAME(UTF8_STRING) = 
_OB_APP_CLASS(UTF8_STRING) = "Polybar"
_OB_APP_NAME(UTF8_STRING) = "polybar"
_OB_APP_ROLE(UTF8_STRING) = 
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "polybar-primary_DVI-I-1"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "polybar-primary_DVI-I-1"
_NET_WM_PID(CARDINAL) = 4326
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE, _OB_WM_STATE_UNDECORATED
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
WM_CLASS(STRING) = "polybar", "Polybar"
WM_NAME(STRING) = "polybar-primary_DVI-I-1"
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 448, 0, 0, 0, 0, 0, 0, 1919, 0, 0
_NET_WM_STRUT(CARDINAL) = 0, 0, 448, 0
jaagr commented 7 years ago

Could you also post the output of xrandr -q

jaagr commented 7 years ago

Openbox doesn't handle the values correctly.

Works:

edgard commented 7 years ago

Sorry for the delay, yeah, that might be the issue, I have two monitors and the rightmost is vertical oriented so it kinda of screws the geometry.

Thanks for the looking into it. Will check with the guys at openbox. :D

[edgard:~]$ xrandr -q
Screen 0: minimum 8 x 8, current 3000 x 1920, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1920x1080+0+420 (normal left inverted right x axis y axis) 531mm x 298mm
   1920x1080     60.00 + 119.98*   99.93  
   1440x900     119.85  
   1280x1024    119.96    75.02    60.02  
   1024x768     119.99    75.03    60.00  
   800x600      119.97    75.00    60.32  
   640x480      120.01    75.00    59.94  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected 1080x1920+1920+0 right (normal left inverted right x axis y axis) 510mm x 290mm
   1920x1080     60.00 +  59.94*   50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.08  
   1440x480      59.94    60.05  
   1360x768      60.02  
   1280x720      60.00    59.94    50.00  
   1024x768      60.00  
   800x600       60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       59.94    59.93  
edgard commented 7 years ago

Well, nevermind, saw that you commited a fix and it works now. wow, thanks! :D

edgard commented 7 years ago

This is fixed, closing.