blob: 74b18194b878822a4a89f8211f5decc088e9d618 (
plain) (
tree)
|
|
#!/bin/bash
monitors=$(swaymsg -t get_outputs -r | jq -r -c '.[] | .name' | wc -l)
for ((i = 0 ; i < $monitors ; i++)); do
echo $i
active_monitor=$(swaymsg -t get_outputs | jq 'map(.focused)|to_entries|.[]|select(.value)|.key')
bar=$(eww active-windows | grep "bar$i")
if [ "$active_monitor" == "$i" ] && [ "$bar" == "bar$i: bar$i" ]; then
eww close bar$i
elif [ "$active_monitor" == "$i" ]; then
eww open bar$i
fi
done
|