diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 13fcd33..fbd0053 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -69,6 +69,7 @@ :space-evenly false :spacing 5 :halign 'end' + (alhp) (hyprsunset) (volume) (datetime) diff --git a/.config/eww/widgets.scss b/.config/eww/widgets.scss index 836f93e..678a13b 100644 --- a/.config/eww/widgets.scss +++ b/.config/eww/widgets.scss @@ -8,3 +8,4 @@ @import 'widgets/sysmon.scss'; @import 'widgets/swaync.scss'; @import 'widgets/volume.scss'; +@import 'widgets/alhp.scss'; diff --git a/.config/eww/widgets.yuck b/.config/eww/widgets.yuck index 30a4b75..6350bff 100644 --- a/.config/eww/widgets.yuck +++ b/.config/eww/widgets.yuck @@ -8,3 +8,4 @@ (include "widgets/sysmon.yuck") (include "widgets/swaync.yuck") (include "widgets/volume.yuck") +(include "widgets/alhp.yuck") diff --git a/.config/eww/widgets/alhp.scss b/.config/eww/widgets/alhp.scss new file mode 100644 index 0000000..5b234d7 --- /dev/null +++ b/.config/eww/widgets/alhp.scss @@ -0,0 +1,11 @@ +.alhp{ + &--good { + background: olivedrab; + color: white; + } + + &--bad { + background: maroon; + color: white; + } +} diff --git a/.config/eww/widgets/alhp.yuck b/.config/eww/widgets/alhp.yuck new file mode 100644 index 0000000..119c707 --- /dev/null +++ b/.config/eww/widgets/alhp.yuck @@ -0,0 +1,15 @@ +(deflisten alhpNogo :initial '{"total": 0, "packages": []}' "alhp.utils -j") + +(defwidget alhp [] + (box + :class '${alhpNogo.total == 0 ? "alhp--good" : "alhp--bad"}' + :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} "))))