fixing up eww for better things

This commit is contained in:
Chris Cochrun 2025-05-08 14:27:39 -05:00
parent 9a9e1cef44
commit 5976121dad
4 changed files with 54 additions and 52 deletions

View file

@ -17,7 +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 gpu_percent :interval "1s" "gpu")
;; (defpoll nextcloud :interval "2s" "scripts/nextcloud.sh")
(deflisten volume_percent :interval "0.2s" "tail -F /tmp/vol")
(deflisten appname "scripts/appname")
@ -139,13 +139,10 @@
:space-evenly false
:spacing 0
(button
:onclick "scripts/pop system"
:onclick "alacritty --class btop -e btop -p 2 &"
:class "icondisk"
:tooltip "${DISK}"
"󰋊")
(label
:text "${DISK}"
:class "disk_label")))
"󰋊 ${DISK}")))
(defwidget bright []
(box
@ -158,11 +155,7 @@
:class "iconbright"
;; :onclick "scripts/pop audio"
:tooltip "${brightness_percent}%"
"")
(label
:text brightness_percent
:class "bright_label"))
)
" ${brightness_percent}")))
(defwidget volume []
(box
@ -172,12 +165,9 @@
:space-evenly false
(button
:class "iconvol"
:onclick "scripts/pop audio"
:onclick "alacritty --class pulsemixer -e pulsemixer &"
:tooltip "${volume_percent}%"
"󰕾")
(label
:text volume_percent
:class "vol_label")))
"󰕾 ${volume_percent}")))
(defwidget cpu []
(box
@ -186,13 +176,10 @@
:hexpand "false"
:space-evenly false
(button
:onclick "scripts/pop system"
:onclick "alacritty --class btop -e btop &"
:class "iconcpu"
:tooltip "using ${EWW_CPU.avg}% of cpu"
"")
(label
:text "${round(EWW_CPU.avg, 0)}%"
:class "cpu_label")))
" ${round(EWW_CPU.avg, 0)}%")))
(defwidget gpu []
(box
@ -201,13 +188,10 @@
:hexpand "false"
:space-evenly false
(button
:onclick "scripts/pop system"
:onclick "alacritty --class btop -e nvtop &"
:class "icongpu"
:tooltip gpu
"󱤓")
(label
:text gpu
:class "gpu_label")))
:tooltip gpu_percent
"󱤓 ${gpu_percent}")))
(defwidget mem []
(box
@ -216,13 +200,10 @@
:vexpand "true"
:hexpand "false"
(button
:onclick "scripts/pop system"
:onclick "alacritty --class btop -e btop &"
:class "iconmem"
:tooltip "using ${EWW_RAM.used_mem_perc}% ram"
"")
(label
:text "${round(EWW_RAM.used_mem_perc, 0)}%"
:class "mem_label")))
" ${round(EWW_RAM.used_mem_perc, 0)}%")))
(defwidget kdeconnect []
(box