adding gpu to eww

This commit is contained in:
Chris Cochrun 2025-05-05 13:05:43 -05:00
parent 27ffac56bc
commit df37a2b214
2 changed files with 31 additions and 0 deletions

View file

@ -17,6 +17,7 @@
(defpoll WLAN_ICON :interval "1m" "scripts/wifi --ICON")
(defpoll HOST :interval "1h" "hostname")
(defpoll DISK :interval "1m" "disk")
(defpoll gpu :interval "1s" "gpu")
;; (defpoll nextcloud :interval "2s" "scripts/nextcloud.sh")
(deflisten volume_percent :interval "0.2s" "tail -F /tmp/vol")
(deflisten appname "scripts/appname")
@ -193,6 +194,21 @@
:text "${round(EWW_CPU.avg, 0)}%"
:class "cpu_label")))
(defwidget gpu []
(box
:class "gpu_module"
:vexpand "false"
:hexpand "false"
:space-evenly false
(button
:onclick "scripts/pop system"
:class "icongpu"
:tooltip "using ${gpu} of gpu"
"󱤓")
(label
:text "${gpu}"
:class "gpu_label")))
(defwidget mem []
(box
:class "mem_module"
@ -291,6 +307,7 @@
:class "sysmodules"
(disk)
(cpu)
(gpu)
(mem)
;; {right_modules.width > 1 ? null : (bright)}
(bright)