os/arch/bin/bspc.sh: add fullscreening command

This commit is contained in:
Henrik Lissner 2017-01-16 22:31:36 -05:00
parent c9c4b4addd
commit 3dd4def59f

View file

@ -2,10 +2,10 @@
set -e
# A helper script for bspwm; makes the act of switching and swapping nodes act more
# intuitive.
# intuitive. Also hides lemonbar on fullscreening.
if (( $# < 2 )); then
>&2 echo "Usage: $0 [fFsS] DIRECTION"
if (( $# == 0 )); then
>&2 echo "Usage: $0 [f DIR|F DIR|s DIR|S DIR|m]"
exit 1
fi
@ -13,6 +13,14 @@ cmd=$1
dir=$2
case $cmd in
m) main=$(bspc query -M -m primary)
mon=$(bspc query -M -m focused)
if [[ $main == $mon ]]; then
xdotool search --onlyvisible --classname lemonbar windowunmap || \
xdotool search --classname lemonbar windowmap
fi
bspc desktop -l next
;;
# focus
f) if ! bspc node -f "$dir.local"; then
if [[ $(bspc query -M -m "$dir") ]]; then