Add eww/yuck/osd/osd_widg.yuck
This commit is contained in:
parent
dbdfe799a0
commit
9ca2de135f
37
eww/yuck/osd/osd_widg.yuck
Normal file
37
eww/yuck/osd/osd_widg.yuck
Normal file
@ -0,0 +1,37 @@
|
||||
(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}"
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user