diff --git a/config/eww/scripts/heart.sh b/config/eww/scripts/heart.sh index 3cdb2084..491b5089 100755 --- a/config/eww/scripts/heart.sh +++ b/config/eww/scripts/heart.sh @@ -17,7 +17,7 @@ toggle() { [[ "$1" == "toggle" ]] && toggle -startup() { +startup() { if [[ ! -f "$FILE" ]]; then echo 󰣐 > "$FILE" fi @@ -30,6 +30,15 @@ startup() { rfkill block bluetooth fi + "$HYPR_PATH"/osk-toggle.sh getState & + + if grep -q 󰣐 "$FILE"; then + eww close heart + sleep 0.9 && + eww open heart + eww update heart-ts=true + fi + tail -f "$FILE" } diff --git a/config/hypr/main.conf b/config/hypr/main.conf index 41942d80..29ca64fd 100644 --- a/config/hypr/main.conf +++ b/config/hypr/main.conf @@ -24,14 +24,10 @@ exec-once = eww daemon exec-once = eww open left-bar exec-once = eww open notif-panel exec-once = eww open quick-settings-toggle -# TODO: put this in eww configs? -exec-once = $HYPR_PATH/osk-toggle.sh getState # sometimes waybar starts after and stops me from pressing eww buttons exec-once = bash -c "sleep 0.8; eww reload" -exec-once = bash -c "grep -q 󰣐 $HOME/.config/.heart && sleep 0.9 && eww open heart && eww update heart-ts=true" - exec-once = gnome-keyring-daemon --start --components=secrets exec-once = squeekboard diff --git a/config/hypr/scripts/osk-toggle.sh b/config/hypr/scripts/osk-toggle.sh index 7d288841..8da40af3 100755 --- a/config/hypr/scripts/osk-toggle.sh +++ b/config/hypr/scripts/osk-toggle.sh @@ -2,11 +2,11 @@ state () { if [[ $(busctl get-property --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible) == "b true" ]]; then - echo "Running" + #echo "Running" eww open osk eww update osk-ts=true else - echo "Stopped" + #echo "Stopped" if [[ $(eww windows | grep '*osk') != "" ]]; then eww close osk eww update osk-ts=false