Closed gspe closed 7 years ago
The policy so far with unmanaged windows has been that bspwm
does nothing for them. This includes their depth placement (z-index? not sure what the correct term is). A consequence of this is that if you do nothing those windows will appear on top of fullscreen windows and will not respond to mouse input if you use focus_follows_pointer
. The best way to solve this right now is to add the manage=off
rules to your external rules script and run xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" $wid
. Here is an example, note that xdo lower $wid
is enough to fix your fullscreen issue, but if you have problems with mouse input as well, you will need to run the more complex xdo above -t ...
command shown above.
The author @baskerville agrees that it would be better that bspwm
does this bit, but until this is implemented, you are required to call this command yourself.
I've tried this:
#!/usr/bin/env bash
wid=$1
class=$2
instance=$3
title=$(xtitle $wid)
if [[ "$class" == Plank ]]; then
echo manage=off
xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" $wid
fi
and doesn't work, Plank dock always stay above full-screen apps. The output of xprop is:
WM_CLASS(STRING) = "plank", "Plank"
Those commands work correct for my status bar (lemonbar). Instead of trying to get it working via the external rules, you should first try running those command in your shell to see if they work for you to begin with. Maybe e.g. something is incorrect in you configuration. You can use e.g. xwininfo
to get a window's id and then the xdo above -t ...
command with the window id of Plank.
Ow, almost forgot, what version of xdo
do you have? Like I mentioned in the external rule example I linked, older versions than the latest (0.5.6) do not always sync their requests to the X server, making them unreliable.
I've tied the command and works, but the result is not exactly what I want, with:
if [[ "$class" == Plank ]]; then
echo manage=off
xdo above -t "$(xdo id -N Bspwm -n root | sort | head -n 1)" $wid
fi
Plank dock go above Bspwm but below everything else, so it works correctly only if you set the appropriate padding value and you lose the effect because they go behind the window. I've found a better solution using shxkd
# set the window state
super + {t,shift + t,s}
bspc node -t {tiled,pseudo_tiled,floating}; \
xdo raise -N Plank
super + {f}
bspc node -t {fullscreen}; \
xdo lower -N Plank
it works but only if you full-screen application with super+f but not with F11 or similar but is better than previously solution.
A better solution should be an external rule like this:
#! /bin/sh
wid=$1
class=$2
instance=$3
title=$(xtitle $wid)
if xprop -id $wid _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN; then
xdo lower -N Plank
else
xdo raise -N Plank
fi
but this not work because rule are not called when window state change only when window are created.
Ah, I understand, so your use case is a bit more complex. There is a better way to solve your use case in bspwm
than using shxkd
. You can listen to fullscreen events and make the appropriate xdo
calls there. That way it will also work if the application goes fullscreen without explicitly calling bspc node --state fullscreen
. I am using it myself to send fullscreen windows to my main monitor. Here is an example for your use case (untested):
bspc subscribe node_state | while read -r _ _ _ _ state flag; do
if [[ "$state" != fullscreen ]]; then continue; fi
if [[ "$flag" == on ]]; then
xdo lower -N Plank
else
xdo raise -N Plank
fi
done &
Thanks, this solution works perfectly.
Hi, I'm trying bspwm with KDE Plasma 5 and everything seams to work quite nicely except that all dock apps doesn't go behind when an application is maximized to full-screen, I've tried with F11 and mod-f and the result is the same the application goes to full-screen but the dock stay above the application. With other wm like Xmonad this not happens so I think that is a problem with bspwm or with my config.
This is my bspwmrc