diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-06-09 19:52:29 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-06-09 19:52:29 +0100 |
commit | 611910dc4e36177ae8910d4df76dee8af2066451 (patch) | |
tree | b43ddf32e31189e48b110b44433ed45453bfba69 /.config/eww/scripts/bar-toggle.sh | |
parent | c0eda75eba998745cc3b945184be1559017bb8a1 (diff) |
Updated for Chimera Linux use
Diffstat (limited to '.config/eww/scripts/bar-toggle.sh')
-rwxr-xr-x | .config/eww/scripts/bar-toggle.sh | 6 |
1 files changed, 4 insertions, 2 deletions
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 |