aboutsummaryrefslogtreecommitdiff
path: root/.config/eww
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww')
-rwxr-xr-x.config/eww/scripts/bar-toggle.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/.config/eww/scripts/bar-toggle.sh b/.config/eww/scripts/bar-toggle.sh
index 8656687..ea7e6b0 100755
--- a/.config/eww/scripts/bar-toggle.sh
+++ b/.config/eww/scripts/bar-toggle.sh
@@ -6,6 +6,9 @@ for ((i = 0 ; i < $monitors ; i++)); do
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
+ ((active_monitor ^= 1))
+ fi
bar=$(eww active-windows | grep "bar$i")
if [ "$active_monitor" == "$i" ] && [ "$bar" == "bar$i: bar$i" ]; then
eww close bar$i