made togglebar per monitor now work

main
Your Name 2025-06-11 11:28:36 +02:00
parent 6661cfc2c5
commit e913a0f88d
1 changed files with 2 additions and 1 deletions

View File

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