18 lines
628 B
Plaintext
18 lines
628 B
Plaintext
(defwidget hardware [ ?cpu ?memory ?visible ]
|
|
(eventbox :class "hardware-eventbox button"
|
|
:onclick "sh ${EWW_CONFIG_DIR}/scripts/eww-window.sh toggle hardware-monitor"
|
|
:visible { visible == "" || visible ? true : false }
|
|
(box :class "hardware"
|
|
:space-evenly false
|
|
(box :class "cpu"
|
|
:visible { cpu == "" || cpu ? true : false }
|
|
(label :text " ${ round(EWW_CPU?.avg, 0) }%")
|
|
)
|
|
(box :class "memory"
|
|
:visible { memory == "" || memory ? true : false }
|
|
(label :text " ${ round(EWW_RAM?.used_mem_perc, 0) }%")
|
|
)
|
|
)
|
|
)
|
|
)
|