From 3dd4def59f51aa582f0074e6bccf1958a39069a8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Jan 2017 22:31:36 -0500 Subject: [PATCH] os/arch/bin/bspc.sh: add fullscreening command --- os/arch/bin/bspc.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/os/arch/bin/bspc.sh b/os/arch/bin/bspc.sh index fc753626..9933d118 100755 --- a/os/arch/bin/bspc.sh +++ b/os/arch/bin/bspc.sh @@ -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