bar
bar copied to clipboard
Allow for always-below
Currently lemonbar always makes itself always on top, however that messes up with fullscreen windows since the bar is always above them. _NET_WM_STATE_BELOW looks like what is necessary to force the bar window to the bottom.
And this is not a WM issue. bar is an unmanaged window.
I don't have that issue here with openbox.
Note: the issue comes up if I use the -d switch.
'lemonbar',
'-fSource Sans Pro:size=11',
'-fFontAwesome:size=11',
'-gx20'
I don't believe that I'm using the -d switch.
I didn't say that you use the -d switch, I just mentioned what I experienced.
With unmanaged windows, it's irrelevant.
Uhh, I think it's up to the WM to raise the fullscreen window to the top of the stack.
I'd like to eliminate this script:
#!/bin/bash
until bar_id=$(xdo id -a aiopanel) ; do
sleep 0.01
done
xdo below -t $(xdo id -n root) $bar_id
If the bar could do this itself, that would be awesome.
Holy shit, that's horrid. Did you try changing this line instead of coming up with that monstrosity?
Yes, I tried that before making a hack script. It didn't seem to change behavior.
What about this patch:
diff --git a/lemonbar.c b/lemonbar.c
index 9220af0..d468dad 100644
--- a/lemonbar.c
+++ b/lemonbar.c
@@ -1210,6 +1210,8 @@ init (char *wm_name)
// Some WM such as Openbox need this
xcb_configure_window(c, mon->window, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, (const uint32_t []){ mon->x, mon->y });
+ xcb_configure_window(c, mon->window, XCB_CONFIG_WINDOW_STACK_MODE, (const uint32_t []){ XCB_STACK_MODE_BELOW });
+
// Set the WM_NAME atom to the user specified value
if (wm_name)
xcb_change_property(c, XCB_PROP_MODE_REPLACE, mon->window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8 ,strlen(wm_name), wm_name);
Applying the above patch worked perfectly for me. (i3-gaps, with the -d option) Edit: Sorry to necro.