aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/eww/yuck.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-27 18:58:52 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-29 03:50:31 +0530
commitd380e7e2df8a560f64d32ea4150f4423d8029d50 (patch)
tree4470e85b1020632ea1a15ca457827aa3e469c08f /modules/desktop/eww/yuck.nix
parentc22a0856fc20b866602086f469262e5acbb6ec36 (diff)
downloadhome-manager-config-d380e7e2df8a560f64d32ea4150f4423d8029d50.tar.gz
home-manager-config-d380e7e2df8a560f64d32ea4150f4423d8029d50.zip
desktop: added tooltip for system stats eww bar
Diffstat (limited to 'modules/desktop/eww/yuck.nix')
-rw-r--r--modules/desktop/eww/yuck.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/desktop/eww/yuck.nix b/modules/desktop/eww/yuck.nix
index 8e7f197..253c274 100644
--- a/modules/desktop/eww/yuck.nix
+++ b/modules/desktop/eww/yuck.nix
@@ -91,9 +91,10 @@
''
(defpoll time :interval "10s" "date '+%H:%M'")
(defpoll date :interval "60s" "date '+%d/%m'")
+ (defpoll full_date :interval "60s" "date '+%A, %d %B %Y'")
(deflisten workspaces :initial "[]" "${lib.getExe workspaces}")
(deflisten active-windows :initial "[]" "${lib.getExe activate-windows}")
- (deflisten system_stats :initial "{\"cpu\":0,\"ram\":0,\"net\":{\"status\":\"down\",\"type\":\"\",\"iface\":\"\",\"speed\":\"\"}}" "${lib.getExe system-stats}")
+ (deflisten system_stats :initial "{\"cpu\":0,\"ram\":0,\"net\":{\"status\":\"down\",\"tooltip\":\"Network Offline\",\"routes\":[]}}" "${lib.getExe system-stats}")
(defwindow bar
:monitor 0
@@ -143,20 +144,24 @@
(defwidget system-widget []
(box :orientation "v" :space-evenly false :spacing 6 :halign "fill" :class "system"
(box :orientation "v" :class "system-item" :halign "fill" :space-evenly false :spacing 4
+ :tooltip "''${system_stats.net.tooltip}"
(image :class "system-icon"
- :path "''${system_stats.net.status == 'down' ? '${../../../assets/icons/bar/offline.svg}' : system_stats.net.type == 'wifi' ? '${../../../assets/icons/bar/wifi.svg}' : system_stats.net.type == 'ethernet' ? '${../../../assets/icons/bar/ethernet.svg}' : '${../../../assets/icons/bar/offline.svg}'}"
+ :path "''${system_stats.net.status == 'down' ? '${../../../assets/icons/bar/offline.svg}' : system_stats.net.routes[0].type == 'wifi' ? '${../../../assets/icons/bar/wifi.svg}' : system_stats.net.routes[0].type == 'ethernet' ? '${../../../assets/icons/bar/ethernet.svg}' : '${../../../assets/icons/bar/offline.svg}'}"
:image-width 24 :image-height 24)
(label :class "system-label small"
- :text "''${system_stats.net.tx != ''' ? system_stats.net.tx : '-'}")
+ :text "''${system_stats.net.status == 'down' ? '-' : system_stats.net.routes[0].tx}")
(label :class "system-label small"
- :text "''${system_stats.net.rx != ''' ? system_stats.net.rx : '-'}"))
+ :text "''${system_stats.net.status == 'down' ? '-' : system_stats.net.routes[0].rx}"))
(box :orientation "v" :class "system-item" :space-evenly false :spacing 4
+ :tooltip "CPU: ''${system_stats.cpu}%"
(image :class "system-icon" :path "${../../../assets/icons/bar/cpu.svg}" :image-width 24 :image-height 24)
(label :class "system-label" :text "''${system_stats.cpu}%"))
(box :orientation "v" :class "system-item" :space-evenly false :spacing 4
+ :tooltip "RAM: ''${system_stats.ram}%"
(image :class "system-icon" :path "${../../../assets/icons/bar/ram.svg}" :image-width 24 :image-height 24)
(label :class "system-label" :text "''${system_stats.ram}%"))
(box :orientation "v" :class "system-item" :space-evenly false :spacing 4
+ :tooltip "''${full_date} ''${time} (''${date})"
(image :class "system-icon" :path "${../../../assets/icons/bar/calendar.svg}" :image-width 24 :image-height 24)
(label :class "system-label small" :text time)
(label :class "system-label small" :text date))))