fix bspwm bug for auto hide/show (same as i3 one)

Before, using the -a option with bspwm would float any window after
auto-hiding then auto-showing it. This will prevent non-floating windows that are auto hidden from being
floated afterwards.
long-opts
angelic-sedition 10 years ago
parent 0a74e25f3a
commit b0cbc61686

@ -110,6 +110,9 @@ wm_autodetect_settings() {
map_pre() { map_pre() {
bspc rule -a "$1" -o floating=on bspc rule -a "$1" -o floating=on
} }
is_floating() {
bspc query -T | grep "$(printf 0x%x "$1").*f-"
}
# tiling window manager with no support for floating; can toggle fullscreen instead for the dropdown # tiling window manager with no support for floating; can toggle fullscreen instead for the dropdown
elif [[ $wm == herbstluftwm ]]; then elif [[ $wm == herbstluftwm ]]; then
map_post() { map_post() {
@ -288,7 +291,7 @@ wid_toggle() {
get_geometry() { get_geometry() {
# so that won't float a tiled window later when showing # so that won't float a tiled window later when showing
if [[ -n $(type is_floating) ]] && [[ -z $(is_floating) ]]; then if [[ -n $(type is_floating) ]] && [[ -z $(is_floating "$1") ]]; then
# window is not floating; don't bother saving geometry # window is not floating; don't bother saving geometry
echo "false" echo "false"
else else

Loading…
Cancel
Save