You are not logged in.

#1 2021-02-04 02:22:56

cosmogroid
Member
Registered: 2020-05-31
Posts: 10

[SOLVED] Margins only on one display Openbox

Does anyone know a way to set side/top/bottom margins for only one display or on a per-display basis on Openbox?

Last edited by cosmogroid (2021-02-10 17:51:39)

Offline

#2 2021-02-04 07:42:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] Margins only on one display Openbox

https://bbs.archlinux.org/viewtopic.php … 0#p1941730

You could omit the openbox config and set https://specifications.freedesktop.org/ … 2973033680 w/ xprop.
Typically panels set those values, btw.

Offline

#3 2021-02-05 01:15:22

cosmogroid
Member
Registered: 2020-05-31
Posts: 10

Re: [SOLVED] Margins only on one display Openbox

The reason I can't just set margins with a panel is because I use multiple panels next to each other and openbox seems to sometimes ignore margins when there isn't a single panel on the edge. I've looked at using xprop and editing _NET_WORKAREA for the root window instead of trying to set _NET_WM_STRUT for each panel, like this

xprop -root -f _NET_WORKAREA 32c -set _NET_WORKAREA 0,36,2944,1230

just to play around with values but I can't seem to get openbox to change behavior after that.

Offline

#4 2021-02-05 06:30:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] Margins only on one display Openbox

_NET_WORKAREA is controlled by the WM so it'll reasonably ignore and probably even just steamroll over your idea.

openbox seems to sometimes ignore margins when there isn't a single panel on the edge

Why would there be a margin then?

Maybe let's deal in the concrete situation: "xrandr -q" and "xprop | grep STRUT" and "xwininfo" for each of the panels you expect to strut.
Also the unadultered "xprop -root _NET_WORKAREA" for comparism.

Panels have in the past kinda "missed" the "MUST be specified in root window coordinates" part of the spec…

Offline

#5 2021-02-08 23:46:32

cosmogroid
Member
Registered: 2020-05-31
Posts: 10

Re: [SOLVED] Margins only on one display Openbox

Okay, manually setting _NET_WM_STRUT for the panels seems to work and Openbox responds immediately. Polybar wasn't setting the property even when I told it to but this works. Thanks for the help.

Offline

#6 2021-02-09 08:24:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] Margins only on one display Openbox

You may want to file a bug against polybar.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB