From 0c41ca33b2b064ea05f603ae94550fd737f9074b Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sun, 12 Jan 2025 12:12:31 -0300 Subject: [PATCH] :sparkles: eww: stuff! --- eww/scripts/notification-popup.sh | 8 ++++++-- eww/scripts/notification-remove.sh | 2 ++ eww/styles/general.scss | 5 ++--- eww/widgets/bar/media.yuck | 2 +- eww/widgets/bar/window.yuck | 2 +- eww/widgets/control-center/tiles.yuck | 1 + eww/widgets/separator.yuck | 2 +- eww/windows/control-center.yuck | 2 ++ 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/eww/scripts/notification-popup.sh b/eww/scripts/notification-popup.sh index 4001335..0888cde 100644 --- a/eww/scripts/notification-popup.sh +++ b/eww/scripts/notification-popup.sh @@ -30,10 +30,14 @@ if ! [[ $@ == "" ]]; then # Critical urgency is handled by eww, no need to count down case $urgency in - 0*) + 0) sleep $timeout_low ;; - 1*) + 1) + sleep $timeout_normal + ;; + 2) ;; + *) sleep $timeout_normal ;; esac diff --git a/eww/scripts/notification-remove.sh b/eww/scripts/notification-remove.sh index 6d4f2ea..b2f1ac3 100644 --- a/eww/scripts/notification-remove.sh +++ b/eww/scripts/notification-remove.sh @@ -19,3 +19,5 @@ else echo "[error] Notification history not reachable or id not provided" exit 1 fi + +exit 0 diff --git a/eww/styles/general.scss b/eww/styles/general.scss index aa187b1..7ffa4db 100644 --- a/eww/styles/general.scss +++ b/eww/styles/general.scss @@ -215,7 +215,7 @@ tooltip { } -box.separator { +.separator { background: darken($color: $foreground, $amount: 20); &.horizontal { @@ -225,7 +225,6 @@ box.separator { &.vertical { margin: 4px 10px; - padding: 0 1px; + padding: 1px 0; } } - diff --git a/eww/widgets/bar/media.yuck b/eww/widgets/bar/media.yuck index c8a33eb..f21cc24 100644 --- a/eww/widgets/bar/media.yuck +++ b/eww/widgets/bar/media.yuck @@ -45,7 +45,7 @@ (button :class "url" :onclick "wl-copy '${json_media.url}'" :tooltip "Copy link to Clipboard" - :visible { json_media != "" && json_media.url != "null" } + :visible { json_media.url != "" && json_media.url != "null" } "󰌷") (button :class "previous" :onclick "playerctl previous --player=${json_media.player}" diff --git a/eww/widgets/bar/window.yuck b/eww/widgets/bar/window.yuck index db43c8b..f318a56 100644 --- a/eww/widgets/bar/window.yuck +++ b/eww/widgets/bar/window.yuck @@ -7,7 +7,7 @@ :orientation "horizontal" (image :class "icon" - :icon "${ json_active_window.initialClass =~ 'zen-(.*)$' ? 'zen-browser' : json_active_window.initialClass }" + :icon "${ json_active_window.initialClass =~ 'zen' ? 'zen-browser' : json_active_window.initialClass }" :icon-size "toolbar") (box :class "info" diff --git a/eww/widgets/control-center/tiles.yuck b/eww/widgets/control-center/tiles.yuck index 9c31824..72e495e 100644 --- a/eww/widgets/control-center/tiles.yuck +++ b/eww/widgets/control-center/tiles.yuck @@ -53,6 +53,7 @@ :onunchecked "${ondisable}" :visible { visible == "" || visible ? true : false } :checked { enabled == "" || !enabled ? false : true } + :timeout "2s" :class "tile-checkbox ${class}" (box :class "tile" diff --git a/eww/widgets/separator.yuck b/eww/widgets/separator.yuck index ddad3c3..e21587d 100644 --- a/eww/widgets/separator.yuck +++ b/eww/widgets/separator.yuck @@ -1,4 +1,4 @@ (defwidget separator [ ?orientation ?alpha ?style ] - (box :class "separator ${ orientation == '' || orientation == 'horizontal' ? 'horizontal' : 'vertical' }" + (box :class "separator ${ orientation == '' || orientation == 'horizontal' || orientation == "h" ? 'horizontal' : 'vertical' }" :style "opacity: ${ alpha == '' ? 1 : alpha }; ${style}") ) diff --git a/eww/windows/control-center.yuck b/eww/windows/control-center.yuck index 807cdd1..edc031e 100644 --- a/eww/windows/control-center.yuck +++ b/eww/windows/control-center.yuck @@ -29,6 +29,8 @@ :visible { json_media == "" || (json_media.title == "null" && json_media.artist == "null") ? false : true }) ) + (separator :orientation "vertical" + :alpha ".08") (notifications) (box :class "bottom button-row" :halign "end"