ark/users/modules/eww/windows/system.yuck
2022-09-14 15:35:52 +03:00

94 lines
2.1 KiB
Plaintext

(defwidget system []
(box
:class "sys-win"
:orientation "v"
; cpu
(box
:class "sys-box"
:space-evenly "false"
:halign "start"
(circular-progress
:value "${EWW_CPU.avg}"
:class "sys-cpu"
:thickness "3"
(label
:text ""
:class "sys-icon-cpu"))
(box
:orientation "v"
:vexpand "false"
(label
:text "cpu"
:halign "start"
:class "sys-text-cpu")
(label
:text "${round(EWW_CPU.avg,2)}%"
:halign "start"
:class "sys-text-sub")
(label
:text "${EWW_CPU.cores[0].freq} MHz"
:halign "start"
:class "sys-text-sub")))
; memory
(box
:class "sys-box"
:space-evenly "false"
:halign "start"
(circular-progress
:value {memory.percentage}
:class "sys-mem"
:thickness "3"
(label
:text ""
:class "sys-icon-mem"))
(box
:orientation "v"
(label
:text "memory"
:halign "start"
:class "sys-text-mem" )
(label
:text "${memory.used} | ${memory.total}"
:halign "start"
:class "sys-text-sub" )))
; battery
(box
:class "sys-box"
:space-evenly "false"
(circular-progress
:value "${EWW_BATTERY["BAT0"].capacity}"
:class "sys-bat"
:style "color: ${battery.color};"
:thickness 3
(label
:text ""
:style "color: ${battery.color};"
:class "sys-icon-bat" ))
(box
:orientation "v"
(label
:text "battery"
:halign "start"
:class "sys-text-bat" )
(label
:text "${EWW_BATTERY["BAT0"].capacity}% | ${battery.wattage}"
:halign "start"
:class "sys-text-sub" )
(label
:text "${battery.status}"
:halign "start"
:class "sys-text-sub" )))))
(defwindow system_win
:monitor 0
:geometry (geometry
:x "0%"
:y "0%"
:anchor "top right"
:width "0"
:height "0")
(system))