diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-28 03:31:06 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-29 03:50:31 +0530 |
| commit | 112d93af69e922b779b5dd3f1be9fb407211bb0a (patch) | |
| tree | 7bbc1d19a85375e8a7e004c3a72461ae4d17752a /modules/desktop/eww/yuck.nix | |
| parent | d380e7e2df8a560f64d32ea4150f4423d8029d50 (diff) | |
| download | home-manager-config-112d93af69e922b779b5dd3f1be9fb407211bb0a.tar.gz home-manager-config-112d93af69e922b779b5dd3f1be9fb407211bb0a.zip | |
desktop: more informative eww bar tooltips
Diffstat (limited to 'modules/desktop/eww/yuck.nix')
| -rw-r--r-- | modules/desktop/eww/yuck.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/desktop/eww/yuck.nix b/modules/desktop/eww/yuck.nix index 253c274..1f2f993 100644 --- a/modules/desktop/eww/yuck.nix +++ b/modules/desktop/eww/yuck.nix @@ -94,7 +94,9 @@ (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\",\"tooltip\":\"Network Offline\",\"routes\":[]}}" "${lib.getExe system-stats}") + (deflisten system_stats + :initial "{\"cpu\":{\"percent\":0,\"per_core\":[],\"freq_mhz\":null,\"load_avg\":null,\"tooltip\":\"CPU: 0%\"},\"ram\":{\"percent\":0,\"used\":\"0B\",\"total\":\"0B\",\"available\":\"0B\",\"swap_percent\":0,\"swap_used\":\"0B\",\"swap_total\":\"0B\",\"speed_mhz\":null,\"tooltip\":\"RAM: 0%\"},\"net\":{\"status\":\"down\",\"tooltip\":\"Network Offline\",\"routes\":[]}}" + "${lib.getExe system-stats}") (defwindow bar :monitor 0 @@ -153,13 +155,13 @@ (label :class "system-label small" :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}%" + :tooltip "''${system_stats.cpu.tooltip}" (image :class "system-icon" :path "${../../../assets/icons/bar/cpu.svg}" :image-width 24 :image-height 24) - (label :class "system-label" :text "''${system_stats.cpu}%")) + (label :class "system-label" :text "''${system_stats.cpu.percent}%")) (box :orientation "v" :class "system-item" :space-evenly false :spacing 4 - :tooltip "RAM: ''${system_stats.ram}%" + :tooltip "''${system_stats.ram.tooltip}" (image :class "system-icon" :path "${../../../assets/icons/bar/ram.svg}" :image-width 24 :image-height 24) - (label :class "system-label" :text "''${system_stats.ram}%")) + (label :class "system-label" :text "''${system_stats.ram.percent}%")) (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) |
