From b0cbc61686337f0aa76f170d31c4dab745caa2a6 Mon Sep 17 00:00:00 2001 From: angelic-sedition Date: Thu, 19 Feb 2015 12:20:44 -0500 Subject: [PATCH] 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. --- tdrop | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tdrop b/tdrop index 59c2cc0..f02a830 100755 --- a/tdrop +++ b/tdrop @@ -110,6 +110,9 @@ wm_autodetect_settings() { map_pre() { 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 elif [[ $wm == herbstluftwm ]]; then map_post() { @@ -288,7 +291,7 @@ wid_toggle() { get_geometry() { # 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 echo "false" else