diff --git a/desktopenvs/hyprland/hypr-usr/binds.conf b/desktopenvs/hyprland/hypr-usr/binds.conf index 226e1b2..7fe8049 100644 --- a/desktopenvs/hyprland/hypr-usr/binds.conf +++ b/desktopenvs/hyprland/hypr-usr/binds.conf @@ -27,6 +27,7 @@ $vimright = l $vimup = k $vimdown = j +bind = $mainMod CTRL, P, exec, bash ~/Dotfiles/desktopenvs/hyprland/scripts/togglewinbars.sh #bind = $mainMod, E, hyprexpo:expo, toggle # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more diff --git a/desktopenvs/hyprland/scripts/togglebar.sh b/desktopenvs/hyprland/scripts/togglebar.sh index 129d41d..bab3263 100755 --- a/desktopenvs/hyprland/scripts/togglebar.sh +++ b/desktopenvs/hyprland/scripts/togglebar.sh @@ -1,15 +1,34 @@ #!/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 -statecon=$( hyprpm list | grep -A1 hyprbars | grep true) +monitorsum=$(hyprctl monitors | grep ID | wc -l) + +statecon=$(eww active-windows) #notify-send $statecon if [ "$statecon" != '' ]; then - hyprpm disable hyprbars + for i in $(seq 1 $monitorsum); + do + declare -i curmon=$i-1 + /usr/bin/eww open --toggle bar$curmon + done else - hyprpm enable hyprbars + for i in $(seq 1 $monitorsum); + do + declare -i curmon=$i-1 + /usr/bin/eww open bar --id bar$curmon --arg monitor=$curmon + done fi + diff --git a/desktopenvs/hyprland/scripts/togglewinbars.sh b/desktopenvs/hyprland/scripts/togglewinbars.sh new file mode 100755 index 0000000..129d41d --- /dev/null +++ b/desktopenvs/hyprland/scripts/togglewinbars.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +statecon=$( hyprpm list | grep -A1 hyprbars | grep true) +#notify-send $statecon +if [ "$statecon" != '' ]; then + + hyprpm disable hyprbars + +else + + hyprpm enable hyprbars + +fi + +