Bspwm: Hide Lemonbar dynamically?

Created on 15 May 2017  路  3Comments  路  Source: baskerville/bspwm

I am trying to hide my panel under a few specific conditions but I cant make it work.

I'm using lemonbar and have set an Xname of "sp" and then queried window ID using xwininfo. The spw is the panelwindowID.

Got "bspc node "${spw}" -g hidden=on" which works for normal windows tracked by bspwm but not for panels.

So what am I missing here?

Most helpful comment

In the source code of rule.c you can find the following:

...
} else if (a == ewmh->_NET_WM_WINDOW_TYPE_DOCK ||
           a == ewmh->_NET_WM_WINDOW_TYPE_DESKTOP ||
           a == ewmh->_NET_WM_WINDOW_TYPE_NOTIFICATION) {
  csq->manage = false;
...

And since Lemonbar is a dock as you can see with xprop:

_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK

Means that bspwm will not manage the Lemonbar windows, so any bspc command on them will fail.

Instead you could use the xdo program by the same author as bspwm: xdo hide -a sp. I do not know what your reason is to hide the panel, but I use xdo to make sure the Lemonbar windows are not above fullscreen windows with the following: xdo lower -a sp.

PS: If xdo does not work for you, be sure to use the latest version (0.5.6), because earlier versions did not sync with the X server, causing commands to sometimes not take effect in time.

All 3 comments

In the source code of rule.c you can find the following:

...
} else if (a == ewmh->_NET_WM_WINDOW_TYPE_DOCK ||
           a == ewmh->_NET_WM_WINDOW_TYPE_DESKTOP ||
           a == ewmh->_NET_WM_WINDOW_TYPE_NOTIFICATION) {
  csq->manage = false;
...

And since Lemonbar is a dock as you can see with xprop:

_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK

Means that bspwm will not manage the Lemonbar windows, so any bspc command on them will fail.

Instead you could use the xdo program by the same author as bspwm: xdo hide -a sp. I do not know what your reason is to hide the panel, but I use xdo to make sure the Lemonbar windows are not above fullscreen windows with the following: xdo lower -a sp.

PS: If xdo does not work for you, be sure to use the latest version (0.5.6), because earlier versions did not sync with the X server, causing commands to sometimes not take effect in time.

@Anachron did xdo hide work for you?

Yep, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baskerville picture baskerville  路  3Comments

evanescente-ondine picture evanescente-ondine  路  6Comments

alecive picture alecive  路  7Comments

bcspragu picture bcspragu  路  7Comments

btlvr picture btlvr  路  5Comments