From fddcc8dc0424a2e4ce4629d3a23165324ef39a48 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 13 Aug 2023 18:26:59 -0400 Subject: [PATCH] feat(eww): add qs toggle and notif to on-release buttons --- config/eww/quick-settings/quick-settings.yuck | 5 ++++- config/eww/traybuttons/traybuttons.yuck | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/config/eww/quick-settings/quick-settings.yuck b/config/eww/quick-settings/quick-settings.yuck index 35534c9..d5b4ddb 100644 --- a/config/eww/quick-settings/quick-settings.yuck +++ b/config/eww/quick-settings/quick-settings.yuck @@ -24,10 +24,13 @@ ) ) +(defvar qs-run-off "false") (defwidget quick-settings-logo [] (eventbox :class "quick-settings-logo" - :onclick "$EWW_PATH/qs-toggle.sh off" + :onclick "$EWW_PATH/run.sh '$EWW_PATH/qs-toggle.sh off' qs-run-off &" :cursor "pointer" + :onhover "eww update qs-run-off=true" + :onhoverlost "eww update qs-run-off=false" (box :class "quick-settings-logo" :orientation "h" diff --git a/config/eww/traybuttons/traybuttons.yuck b/config/eww/traybuttons/traybuttons.yuck index 4e54dd5..b8ecc79 100644 --- a/config/eww/traybuttons/traybuttons.yuck +++ b/config/eww/traybuttons/traybuttons.yuck @@ -177,11 +177,13 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Quick Settings Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defvar qs-run-on "false") (defwidget quick-settings-toggle [] (eventbox :class "toggle-off" - :onclick "$EWW_PATH/qs-toggle.sh on" - + :onclick "$EWW_PATH/run.sh '$EWW_PATH/qs-toggle.sh on' qs-run-on &" :cursor "pointer" + :onhover "eww update qs-run-on=true" + :onhoverlost "eww update qs-run-on=false" (box :class "quick-settings-toggle" :orientation "h" @@ -206,10 +208,13 @@ ;; Notification Panel Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar notif-panel-state false) +(defvar notif-run-off "false") (defwidget notif-panel-on [] (eventbox :class "toggle-on" - :onclick "$EWW_PATH/notif-toggle.sh off" + :onclick "$EWW_PATH/run.sh '$EWW_PATH/notif-toggle.sh off' notif-run-off &" :cursor "pointer" + :onhover "eww update notif-run-off=true" + :onhoverlost "eww update notif-run-off=false" (box :class "notif-panel" :orientation "h" @@ -217,10 +222,13 @@ ) ) ) +(defvar notif-run-on "false") (defwidget notif-panel-off [] (eventbox :class "toggle-off" - :onclick "$EWW_PATH/notif-toggle.sh on" + :onclick "$EWW_PATH/run.sh '$EWW_PATH/notif-toggle.sh on' notif-run-on &" :cursor "pointer" + :onhover "eww update notif-run-on=true" + :onhoverlost "eww update notif-run-on=false" (box :class "notif-panel" :orientation "h"