From 3fbf72ff5aefae160a16d754c83bb083d7a5798f Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 13 Aug 2023 16:48:35 -0400 Subject: [PATCH] feat(eww): make osk toggle button also on-release --- config/eww/traybuttons/traybuttons.yuck | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/eww/traybuttons/traybuttons.yuck b/config/eww/traybuttons/traybuttons.yuck index e2f1aa4d..4e54dd5f 100644 --- a/config/eww/traybuttons/traybuttons.yuck +++ b/config/eww/traybuttons/traybuttons.yuck @@ -2,10 +2,13 @@ ;; On-Screen Keyboard Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar osk-ts false) +(defvar osk-run-off "false") (defwidget osk-toggle-on [] (eventbox :class "toggle-on" - :onclick "$HYPR_PATH/osk-toggle.sh toggle &" + :onclick "$EWW_PATH/run.sh '$HYPR_PATH/osk-toggle.sh toggle' osk-run-off &" :cursor "pointer" + :onhover "eww update osk-run-off=true" + :onhoverlost "eww update osk-run-off=false" (box :class "osk-toggle" :orientation "h" @@ -13,10 +16,13 @@ ) ) ) +(defvar osk-run-on "false") (defwidget osk-toggle-off [] (eventbox :class "toggle-off" - :onclick "$HYPR_PATH/osk-toggle.sh toggle &" + :onclick "$EWW_PATH/run.sh '$HYPR_PATH/osk-toggle.sh toggle' osk-run-on &" :cursor "pointer" + :onhover "eww update osk-run-on=true" + :onhoverlost "eww update osk-run-on=false" (box :class "osk-toggle" :orientation "h"