about summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-09-15 16:16:08 +0900
committersefidel <contact@sefidel.net>2023-09-15 16:20:15 +0900
commitf2a0993bfdddf41c6d4f6206bd29f8544b6da9f7 (patch)
treeca30e0750207a58b63416d430d0491fd23e95962 /home
parent037b50d6087faf294c657cae944c4a10b6d5250c (diff)
downloadnixrc-f2a0993bfdddf41c6d4f6206bd29f8544b6da9f7.tar.gz
nixrc-f2a0993bfdddf41c6d4f6206bd29f8544b6da9f7.zip
feat(home/gui): waybar: add network module
Diffstat (limited to 'home')
-rw-r--r--home/profiles/gui/config/waybar/settings.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/home/profiles/gui/config/waybar/settings.nix b/home/profiles/gui/config/waybar/settings.nix
index 86e865a..83b5cf7 100644
--- a/home/profiles/gui/config/waybar/settings.nix
+++ b/home/profiles/gui/config/waybar/settings.nix
@@ -7,7 +7,7 @@ with neotheme.colors;
   height = 22;
   modules-left = [ "pulseaudio" "custom/separator" "cpu" "custom/separator" "memory" "custom/separator" "idle_inhibitor" ];
   modules-center = [ "sway/workspaces" ];
-  modules-right = [ "battery" "custom/separator" "clock" ];
+  modules-right = [ "network" "custom/separator" "battery" "custom/separator" "clock" ];
 
   "sway/workspaces" = {
     all-outputs = true;
@@ -52,6 +52,17 @@ with neotheme.colors;
     format-alt = "<span foreground='#${color6}'>PWR</span> {power}Wh";
   };
 
+  "network" = {
+    format = "<span foreground='#${color1}'>NET</span> {ifname}";
+    format-wifi = "<span foreground='#${color1}'>NET</span> {essid} [{signalStrength}]";
+    format-ethernet = "<span foreground='#${color1}'>NET</span> [ethernet]";
+    format-disconnected = "<span foreground='#${color1}'>NET</span> disconnected";
+    tooltip-format = "{ifname} via {gwaddr}";
+    tooltip-format-wifi = "{ipaddr}/{cidr} via {essid} ({signaldBm}dBm)";
+    tooltip-format-ethernet = "{ipaddr}/{cidr} via Ethernet";
+    tooltip-format-disconnected = "{ifname} Disconnected";
+  };
+
   "idle_inhibitor" = {
     format = "<span foreground='#a89984'>CAFFEINE</span> {status}";
   };