From df37a2b2147a10ec7023922673d263906ba56864 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 5 May 2025 13:05:43 -0500 Subject: [PATCH] adding gpu to eww --- .config/eww/eww.scss | 14 ++++++++++++++ .config/eww/eww.yuck | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 17e6e6b..33b14e8 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -262,6 +262,20 @@ tooltip label { padding-top: 3px; } +.icongpu { + color: $base0E; + // margin: 2px 10px 0px 8px; + padding-top: 3px; + padding-left: 10px; + padding-right: 8px; + // padding-right: 12px; +} + +.gpu_label { + color: $base0E; + padding-top: 3px; +} + // Volume .iconvol { color: $base08; diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index abe690b..6d47fd5 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -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)