Candyrice/eww/yuck/osd/osd_widg.yuck

37 lines
784 B
Plaintext
Raw Normal View History

2024-07-29 18:41:33 +00:00
(defwidget osd_widg [osdtype osd_value]
(overlay
:class "osd_progbar_container ${osdtype}"
:active false
:halign "fill"
:height 50
:width 200
(box
:class "osd_prog_bg"
:halign "fill"
:valign "fill"
:height 50
:width 200
)
(box
:class "osd_prog_filled ${osd_value.status}"
:height 50
:width "${(200/100)*osd_value.level}"
:halign "start"
:valign "fill"
)
(label
:class "osd_value"
:height 35
:halign "end"
:valign "center"
:text "${osd_value.level}%"
)
(label
:class "osd_icon"
:height 35
:halign "start"
:valign "center"
:text "${osd_value.icon}"
)
)
)