made togglebar per monitor

main
Your Name 2025-06-11 09:55:24 +02:00
parent 1ad6a2bd29
commit 6661cfc2c5
1 changed files with 6 additions and 1 deletions

View File

@ -10,14 +10,17 @@ GTK_THEME=cyberqueer
monitorsum=$(hyprctl monitors | grep ID | wc -l)
statecon=$(eww active-windows)
actmon=$(hyprctl monitors | grep -B12 "focused: yes" | head -n1 | cut -d'(' -f 2 | cut -d' ' -f 2 | cut -d')' -f 1)
statecon=$(eww active-windows | grep "bar$actmon")
#notify-send $statecon
if [ "$statecon" != '' ]; then
for i in $(seq 1 $monitorsum);
do
declare -i curmon=$i-1
if [ "$curmon" == "$actmon" ]; then
/usr/bin/eww open --toggle bar$curmon
fi
done
else
@ -25,7 +28,9 @@ else
for i in $(seq 1 $monitorsum);
do
declare -i curmon=$i-1
if [ "$curmon" == "$actmon" ]; then
/usr/bin/eww open bar --id bar$curmon --arg monitor=$curmon
fi
done
fi