diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-27 18:26:36 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-29 03:50:31 +0530 |
| commit | c22a0856fc20b866602086f469262e5acbb6ec36 (patch) | |
| tree | 6f24de0fe86fae87dbe1db430f1f345da4b75f10 /modules/desktop/eww/yuck.nix | |
| parent | d9c4dbd9b4f92c3816c31bae1577e62ce1df5c96 (diff) | |
| download | home-manager-config-c22a0856fc20b866602086f469262e5acbb6ec36.tar.gz home-manager-config-c22a0856fc20b866602086f469262e5acbb6ec36.zip | |
desktop: updated network status in eww bar
Diffstat (limited to 'modules/desktop/eww/yuck.nix')
| -rw-r--r-- | modules/desktop/eww/yuck.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/desktop/eww/yuck.nix b/modules/desktop/eww/yuck.nix index 77d5949..8e7f197 100644 --- a/modules/desktop/eww/yuck.nix +++ b/modules/desktop/eww/yuck.nix @@ -17,6 +17,7 @@ meta.mainProgram = "eww-system-stats"; nativeBuildInputs = [ + pkgs.iw pkgs.wrapGAppsHook3 pkgs.gobject-introspection ]; @@ -92,7 +93,7 @@ (defpoll date :interval "60s" "date '+%d/%m'") (deflisten workspaces :initial "[]" "${lib.getExe workspaces}") (deflisten active-windows :initial "[]" "${lib.getExe activate-windows}") - (deflisten system_stats :initial "{\"cpu\":0,\"ram\":0,\"net\":\"down\"}" "${lib.getExe system-stats}") + (deflisten system_stats :initial "{\"cpu\":0,\"ram\":0,\"net\":{\"status\":\"down\",\"type\":\"\",\"iface\":\"\",\"speed\":\"\"}}" "${lib.getExe system-stats}") (defwindow bar :monitor 0 @@ -142,7 +143,13 @@ (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 - (image :class "system-icon" :path "${../../../assets/icons/bar/wifi.svg}" :image-width 24 :image-height 24)) + (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}'}" + :image-width 24 :image-height 24) + (label :class "system-label small" + :text "''${system_stats.net.tx != ''' ? system_stats.net.tx : '-'}") + (label :class "system-label small" + :text "''${system_stats.net.rx != ''' ? system_stats.net.rx : '-'}")) (box :orientation "v" :class "system-item" :space-evenly false :spacing 4 (image :class "system-icon" :path "${../../../assets/icons/bar/cpu.svg}" :image-width 24 :image-height 24) (label :class "system-label" :text "''${system_stats.cpu}%")) |
