added new widget "alhp"
This commit is contained in:
11
.config/eww/widgets/alhp.scss
Normal file
11
.config/eww/widgets/alhp.scss
Normal file
@@ -0,0 +1,11 @@
|
||||
.alhp{
|
||||
&--good {
|
||||
background: olivedrab;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&--bad {
|
||||
background: maroon;
|
||||
color: white;
|
||||
}
|
||||
}
|
15
.config/eww/widgets/alhp.yuck
Normal file
15
.config/eww/widgets/alhp.yuck
Normal file
@@ -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} "))))
|
Reference in New Issue
Block a user