diff --git a/desktopenvs/hyprland/scripts/togglebar.sh b/desktopenvs/hyprland/scripts/togglebar.sh index 0035608..129d41d 100755 --- a/desktopenvs/hyprland/scripts/togglebar.sh +++ b/desktopenvs/hyprland/scripts/togglebar.sh @@ -1,32 +1,14 @@ #!/bin/bash -#statecon=$(eww state | xargs) -#echo $statecon -#if [[ -z `echo $statecon` ]] ;then -# ~/Dotfiles/desktopenvs/hyprland/scripts/monitorhandler.sh -#else -# eww close-all -#fi -GTK_THEME=cyberqueer -monitorsum=$(hyprctl monitors | grep ID | wc -l) - -statecon=$(eww active-windows) +statecon=$( hyprpm list | grep -A1 hyprbars | grep true) #notify-send $statecon if [ "$statecon" != '' ]; then - for i in $(seq 1 $monitorsum); - do - declare -i curmon=$i-1 - /usr/bin/eww open --toggle bar$curmon - done + hyprpm disable hyprbars else - for i in $(seq 1 $monitorsum); - do - declare -i curmon=$i-1 - /usr/bin/eww open bar --id bar$curmon --arg monitor=$curmon - done + hyprpm enable hyprbars fi