From e421005de7ff025f92e40d1a76e548237e6d5066 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Wed, 9 Jul 2025 15:22:40 +0200 Subject: [PATCH] updated alhp-scripts for eww --- .config/eww/widgets/alhp.scss | 3 +++ .config/eww/widgets/alhp.yuck | 17 +++++++---------- .config/eww/widgets/hypr_workspaces.yuck | 5 ++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.config/eww/widgets/alhp.scss b/.config/eww/widgets/alhp.scss index 5b234d7..b65f2bf 100644 --- a/.config/eww/widgets/alhp.scss +++ b/.config/eww/widgets/alhp.scss @@ -1,4 +1,7 @@ .alhp{ + background: olivedrab; + color: white; + &--good { background: olivedrab; color: white; diff --git a/.config/eww/widgets/alhp.yuck b/.config/eww/widgets/alhp.yuck index 4459afc..81bdae0 100644 --- a/.config/eww/widgets/alhp.yuck +++ b/.config/eww/widgets/alhp.yuck @@ -1,17 +1,14 @@ -(defpoll alhpNogo - :interval "60s" - :initial '{"total": 0, "packages": []}' "alhp.utils -j") +(deflisten alhpNogo :interval "60s" "$HOME/.config/waybar/scripts/alhp.sh") (defwidget alhp [] (box - :class '${alhpNogo.total == 0 ? "alhp--good" : "alhp--bad"}' + :class 'alhp--${alhpNogo.class}' :space-evenly false :spacing 0 (tooltip (box :orientation "vertical" - (for package in {alhpNogo.packages} - (box - :orientation "horizontal" - :space-evenly false - (label :text {package})))) - (label :text "${alhpNogo.total} ")))) + (box + :orientation "horizontal" + :space-evenly false + (label :text {alhpNogo.tooltip}))) + (label :text "${alhpNogo.text} ")))) diff --git a/.config/eww/widgets/hypr_workspaces.yuck b/.config/eww/widgets/hypr_workspaces.yuck index a80bc09..a06ffd0 100644 --- a/.config/eww/widgets/hypr_workspaces.yuck +++ b/.config/eww/widgets/hypr_workspaces.yuck @@ -10,15 +10,14 @@ (box :class "workspaces" :space-evenly false - :height 20 :spacing 0 (for workspace in workspaces (eventbox - :width 35 + :width 40 :onclick "hyprctl dispatch workspace ${workspace.id}" :cursor "pointer" :tooltip "${workspace.name}" :class "workspaces--ws ${workspace.active == true ? 'workspaces--ws--active' : 'workspaces--ws--inactive'} ${workspace.name == 1 ? 'first' : workspace.name == 10 ? 'last' : 'middle'}" (label :class "workspaces--ws--label" - :text "${workspace.name}${workspace.windows > 0 ? '+' : ''}"))))) + :text "${workspace.windows > 0 ? ' ${workspace.windows}' : ''}")))))