Add workaround for chrome

Classname may differ from command name (e.g. google-chrome vs.
google-chrome-stable).
break
noctuid 9 years ago
parent 77992cf141
commit f028683a38

14
tdrop

@ -302,17 +302,21 @@ wm_autoset_for_all() {
# bspwm will use previous size when floating already # bspwm will use previous size when floating already
if [[ $wm == bspwm ]]; then if [[ $wm == bspwm ]]; then
map_pre() { map_pre() {
class=$1
if [[ $1 =~ ^google-chrome ]]; then
class=google-chrome
fi
# newest (using "instance" names) # newest (using "instance" names)
if [[ $(bspwm -v) =~ ^0.9.1 ]]; then if [[ $(bspwm -v) =~ ^0.9.1 ]]; then
if [[ $1 =~ [A-Z] ]]; then if [[ $class =~ [A-Z] ]]; then
bspc rule -a "$1" -o state=floating bspc rule -a "$class" -o state=floating
else else
bspc rule -a \*:"$1" -o state=floating bspc rule -a \*:"$class" -o state=floating
fi fi
else else
# compatability with older syntaxes # compatability with older syntaxes
bspc rule -a "$1" -o state=floating bspc rule -a "$class" -o state=floating
bspc rule -a "$1" -o floating=on bspc rule -a "$class" -o floating=on
fi fi
} }
elif [[ $wm == awesome ]]; then elif [[ $wm == awesome ]]; then

Loading…
Cancel
Save