From e8038dc9ab865fadf8955f858c5d30f5b39759a4 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 10 Apr 2023 13:22:12 -0500 Subject: [PATCH] making battery notify widget have a close button --- eww/battery.yuck | 9 ++++++++- eww/eww.scss | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/eww/battery.yuck b/eww/battery.yuck index 99e5d58..38d3074 100644 --- a/eww/battery.yuck +++ b/eww/battery.yuck @@ -1,3 +1,6 @@ + +(defvar batt_close_hover false) + (defwindow battery :geometry (geometry :x "0px" :y "40px" @@ -34,4 +37,8 @@ :value {EWW_BATTERY["BAT1"].capacity} :orientation "h" :max 100 - :min 0)))) + :min 0)) + (button + :class "close-icon" + :onclick "eww close battery" + "󰅖"))) diff --git a/eww/eww.scss b/eww/eww.scss index 4e58de5..d3b6c5c 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -759,6 +759,17 @@ scale trough { margin: 20px 50px 10px 40px; } +.close-icon { + margin-left: -10px; + margin-right: 10px; + margin-bottom: 50px; + font-size: 28px; +} + +.close-icon:hover { + color: $base08; +} + .volume-container { background-color: $darktransparent; border-radius: 16px;