From 611910dc4e36177ae8910d4df76dee8af2066451 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Sun, 9 Jun 2024 19:52:29 +0100 Subject: Updated for Chimera Linux use --- .config/eww/scripts/bar-toggle.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.config/eww/scripts') diff --git a/.config/eww/scripts/bar-toggle.sh b/.config/eww/scripts/bar-toggle.sh index 74b1819..8656687 100755 --- a/.config/eww/scripts/bar-toggle.sh +++ b/.config/eww/scripts/bar-toggle.sh @@ -1,9 +1,11 @@ #!/bin/bash -monitors=$(swaymsg -t get_outputs -r | jq -r -c '.[] | .name' | wc -l) +monitors=$(river-bedload -print outputs | jq -r -c '.[] | .name' | wc -l | xargs) for ((i = 0 ; i < $monitors ; i++)); do echo $i - active_monitor=$(swaymsg -t get_outputs | jq 'map(.focused)|to_entries|.[]|select(.value)|.key') + active_monitor=$(river-bedload -print outputs | jq 'map(.focused)|to_entries|.[]|select(.value)|.key') + # Flip value e.g 0 to 1 + ((active_monitor ^= 1)) bar=$(eww active-windows | grep "bar$i") if [ "$active_monitor" == "$i" ] && [ "$bar" == "bar$i: bar$i" ]; then eww close bar$i -- cgit v1.2.3