From 8ed8e2b2e21083822234aa4d0d236b1e47cc67cf Mon Sep 17 00:00:00 2001 From: soraefir Date: Sat, 18 May 2024 16:52:08 +0200 Subject: [PATCH] Fix Eww hover --- .../wayland/apps/eww/bar/css/_systray.scss | 5 +++- .../wayland/apps/eww/bar/modules/clock.yuck | 30 ++++++++----------- .../wayland/apps/eww/bar/modules/sys.yuck | 28 ++++++++--------- .../wayland/apps/eww/bar/modules/systray.yuck | 2 +- .../wayland/apps/eww/bar/windows/radio.yuck | 2 +- 5 files changed, 31 insertions(+), 36 deletions(-) diff --git a/modules/home/wayland/apps/eww/bar/css/_systray.scss b/modules/home/wayland/apps/eww/bar/css/_systray.scss index 2a3bbbb..b676f70 100644 --- a/modules/home/wayland/apps/eww/bar/css/_systray.scss +++ b/modules/home/wayland/apps/eww/bar/css/_systray.scss @@ -1,3 +1,6 @@ +.tray * { + padding: $border-width 0px; +} .tray menu { background-color: $base01; color: $base07; @@ -8,7 +11,7 @@ padding: 10px 0px; >menuitem { - margin: 0px $border-width; + margin: 2px $border-width; padding: 0px 10px; &:disabled label { diff --git a/modules/home/wayland/apps/eww/bar/modules/clock.yuck b/modules/home/wayland/apps/eww/bar/modules/clock.yuck index 9963d82..a6453df 100644 --- a/modules/home/wayland/apps/eww/bar/modules/clock.yuck +++ b/modules/home/wayland/apps/eww/bar/modules/clock.yuck @@ -5,36 +5,30 @@ (eventbox :onhover "${EWW_CMD} update date_rev=true" :onhoverlost "${EWW_CMD} update date_rev=false" + :onclick "(sleep 0.1 && ${EWW_CMD} open --toggle calendar)" + :onrightclick "(sleep 0.1 && ${EWW_CMD} open --toggle powermenu)" (box :class "datetime" (overlay (box :orientation "v" - (button - :class "hour" - (label :show-truncated false - :text {hour})) - (button - :class "minute" - (label :show-truncated false - :text {minute}))) + (label :show-truncated false + :class "hour" + :text {hour}) + (label :show-truncated false + :class "minute" + :text {minute})) (revealer :reveal date_rev (box :class "date" :orientation "v" - (button - :onclick "${EWW_CMD} open --toggle calendar" - :onrightclick "${EWW_CMD} open --toggle powermenu" + (label :show-truncated "false" :class "day" - (label :show-truncated "false" - :text {day})) - (button - :onclick "${EWW_CMD} open --toggle calendar" - :onrightclick "${EWW_CMD} open --toggle powermenu" + :text {day}) + (label :show-truncated "false" :class "month" - (label :show-truncated "false" - :text {month}))) + :text {month})) ) ) ) diff --git a/modules/home/wayland/apps/eww/bar/modules/sys.yuck b/modules/home/wayland/apps/eww/bar/modules/sys.yuck index aae60a4..ae7e782 100644 --- a/modules/home/wayland/apps/eww/bar/modules/sys.yuck +++ b/modules/home/wayland/apps/eww/bar/modules/sys.yuck @@ -6,23 +6,21 @@ (defwidget sys-mod [] (module - (button - :class "module" - :onclick "${EWW_CMD} open --toggle sys" + (eventbox + :onclick "(sleep 0.1 && ${EWW_CMD} open --toggle sys)" (box - :orientation "v" - (circular-progress - :value {EWW_CPU.avg} - :class "cpubar" - :thickness 6 - (label :class "icon-text" :text "C")) - - (circular-progress - :value {gpu.devices[0].GRBM2?.CommandProcessor-Graphics?.value?:0} - :class "gpubar" - :thickness 6 - (label :class "icon-text" :text "G")) + :orientation "v" + (circular-progress + :value {EWW_CPU.avg} + :class "cpubar" + :thickness 6 + (label :class "icon-text" :text "C")) + (circular-progress + :value {gpu.devices[0].GRBM2?.CommandProcessor-Graphics?.value?:0} + :class "gpubar" + :thickness 6 + (label :class "icon-text" :text "G")) (circular-progress :value {100*memory.used/memory.total} :class "membar" diff --git a/modules/home/wayland/apps/eww/bar/modules/systray.yuck b/modules/home/wayland/apps/eww/bar/modules/systray.yuck index 0be0668..d4ee7e3 100644 --- a/modules/home/wayland/apps/eww/bar/modules/systray.yuck +++ b/modules/home/wayland/apps/eww/bar/modules/systray.yuck @@ -7,7 +7,7 @@ :class "tray" :space-evenly "true" :orientation "v" - :icon-size 24 + :icon-size 20 :prepend-new "false" ) ) diff --git a/modules/home/wayland/apps/eww/bar/windows/radio.yuck b/modules/home/wayland/apps/eww/bar/windows/radio.yuck index 08b8aae..ff1ef0c 100644 --- a/modules/home/wayland/apps/eww/bar/windows/radio.yuck +++ b/modules/home/wayland/apps/eww/bar/windows/radio.yuck @@ -100,7 +100,7 @@ (box :orientation "v" (button - :onclick "${EWW_CMD} open --toggle --no-daemonize radio" + :onclick "(sleep 0.1 && ${EWW_CMD} open --toggle --no-daemonize radio)" (label :show-truncated false :class "icon-text"