diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-06-09 20:12:21 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-06-09 20:12:21 +0100 |
commit | 9940205894e2ba72a373a9dd93acd7887e8599fe (patch) | |
tree | dcb24838fdaab2ffe44c36a00f0cba4777cf1552 /.config/eww | |
parent | 2e4cf318fdea3b3fe28f27a2392b19591bc955d8 (diff) |
Shortened code for flipping value
Diffstat (limited to '.config/eww')
-rwxr-xr-x | .config/eww/scripts/bar-toggle.sh | 3 |
1 files changed, 1 insertions, 2 deletions
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") |