From 9940205894e2ba72a373a9dd93acd7887e8599fe Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Sun, 9 Jun 2024 20:12:21 +0100 Subject: Shortened code for flipping value --- .config/eww/scripts/bar-toggle.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.config') diff --git a/.config/eww/scripts/bar-toggle.sh b/.config/eww/scripts/bar-toggle.sh index ea7e6b0..5e3f46a 100755 --- a/.config/eww/scripts/bar-toggle.sh +++ b/.config/eww/scripts/bar-toggle.sh @@ -5,8 +5,7 @@ for ((i = 0 ; i < $monitors ; i++)); do echo $i active_monitor=$(river-bedload -print outputs | jq 'map(.focused)|to_entries|.[]|select(.value)|.key') # Flip value e.g 0 to 1 - ((active_monitor ^= 1)) - if [ "$monitors" == "1" ]; then + if [ "$monitors" != "1" ]; then ((active_monitor ^= 1)) fi bar=$(eww active-windows | grep "bar$i") -- cgit v1.2.3