aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-12-07 20:37:13 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-12-07 20:37:13 +0530
commite0dfcfb753be2ae086f497e06affd40beddceb20 (patch)
treeddf17690a892763ec398c9f7beef9c223204bcd3 /modules
parentb7d4e1711262591475016ae57f1ead6cf54b07f6 (diff)
downloadhome-manager-config-e0dfcfb753be2ae086f497e06affd40beddceb20.tar.gz
home-manager-config-e0dfcfb753be2ae086f497e06affd40beddceb20.zip
Added wifi and ether sections to the polybar config + some other slight modification to make sure the components don't resize
Diffstat (limited to 'modules')
-rw-r--r--modules/desktop/polybar/bar/main.nix7
-rw-r--r--modules/desktop/polybar/module/battery.nix4
-rw-r--r--modules/desktop/polybar/module/bspwm.nix8
-rw-r--r--modules/desktop/polybar/module/cpu.nix2
-rw-r--r--modules/desktop/polybar/module/default.nix12
-rw-r--r--modules/desktop/polybar/module/ethernet-separator.nix14
-rw-r--r--modules/desktop/polybar/module/ethernet.nix14
-rw-r--r--modules/desktop/polybar/module/memory.nix4
-rw-r--r--modules/desktop/polybar/module/separator.nix2
-rw-r--r--modules/desktop/polybar/module/time.nix2
-rw-r--r--modules/desktop/polybar/module/volume.nix4
-rw-r--r--modules/desktop/polybar/module/wifi-separator.nix14
-rw-r--r--modules/desktop/polybar/module/wifi.nix21
-rw-r--r--modules/desktop/polybar/module/xwindow.nix2
14 files changed, 89 insertions, 21 deletions
diff --git a/modules/desktop/polybar/bar/main.nix b/modules/desktop/polybar/bar/main.nix
index 326b768..49c3b84 100644
--- a/modules/desktop/polybar/bar/main.nix
+++ b/modules/desktop/polybar/bar/main.nix
@@ -26,10 +26,7 @@ in {
padding-left = 1;
padding-right = 1;
- module-margin-left = 1;
- module-margin-right = 1;
-
- separator = "%{F${base03}}%{T3}│%{T-}%{F-}";
+ # separator = "%{F${base03}}%{T3}│%{T-}%{F-}";
offset-x = "10";
offset-y = "10";
@@ -40,5 +37,5 @@ in {
modules-left = "bspwm separator";
modules-center = "xwindow";
- modules-right = "separator volume battery time memory cpu date";
+ modules-right = "separator volume separator battery separator wifi wifi-separator ethernet ethernet-separator time separator memory separator cpu separator date";
}
diff --git a/modules/desktop/polybar/module/battery.nix b/modules/desktop/polybar/module/battery.nix
index 5787f24..f2a10c8 100644
--- a/modules/desktop/polybar/module/battery.nix
+++ b/modules/desktop/polybar/module/battery.nix
@@ -6,10 +6,14 @@ with config.scheme.withHashtag;
battery = "BAT1";
adapter = "ADP1";
+ low-at = 0;
format-charging = "%{T2}%{F${base03}}<animation-charging>%{F-}%{T-} <label-charging>";
format-discharging = "%{T2}%{F${base03}}<ramp-capacity>%{F-}%{T-} <label-discharging>";
format-full-prefix = "󰁹 ";
+ label-charging = "%percentage:3%%";
+ label-discharging = "%percentage:3%%";
+
ramp-capacity-0 = "󰁺";
ramp-capacity-1 = "󰁻";
ramp-capacity-2 = "󰁼";
diff --git a/modules/desktop/polybar/module/bspwm.nix b/modules/desktop/polybar/module/bspwm.nix
index ed82946..383de8f 100644
--- a/modules/desktop/polybar/module/bspwm.nix
+++ b/modules/desktop/polybar/module/bspwm.nix
@@ -6,16 +6,16 @@ with config.scheme.withHashtag;
label-focused = "%index%";
label-focused-underline = "${base0D}";
- label-focused-padding = 2;
+ label-focused-padding = 1;
label-occupied = "%index%";
- label-occupied-padding = 2;
+ label-occupied-padding = 1;
label-urgent = "%index%";
label-urgent-underline = "${base08}";
- label-urgent-padding = 2;
+ label-urgent-padding = 1;
label-empty = "%index%";
label-empty-foreground = "${base03}";
- label-empty-padding = 2;
+ label-empty-padding = 1;
}
diff --git a/modules/desktop/polybar/module/cpu.nix b/modules/desktop/polybar/module/cpu.nix
index 8134df1..754e6eb 100644
--- a/modules/desktop/polybar/module/cpu.nix
+++ b/modules/desktop/polybar/module/cpu.nix
@@ -5,5 +5,5 @@ with config.scheme.withHashtag;
type = "internal/cpu";
interval = 2;
format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
- label = "%percentage%%";
+ label = "%percentage:3%%";
}
diff --git a/modules/desktop/polybar/module/default.nix b/modules/desktop/polybar/module/default.nix
index fe5b8a1..1a243b0 100644
--- a/modules/desktop/polybar/module/default.nix
+++ b/modules/desktop/polybar/module/default.nix
@@ -1,13 +1,17 @@
{ config, lib }:
{
- "module/separator" = import ./separator.nix { inherit config; };
- "module/xwindow" = import ./xwindow.nix { inherit config; };
+ "module/battery" = import ./battery.nix { inherit config; };
"module/bspwm" = import ./bspwm.nix { inherit config; };
"module/cpu" = import ./cpu.nix { inherit config; };
- "module/memory" = import ./memory.nix { inherit config; };
"module/date" = import ./date.nix { inherit config; };
+ "module/ethernet-separator" = import ./ethernet-separator.nix { inherit config; };
+ "module/ethernet" = import ./ethernet.nix { inherit config; };
+ "module/memory" = import ./memory.nix { inherit config; };
+ "module/separator" = import ./separator.nix { inherit config; };
"module/time" = import ./time.nix { inherit config; };
"module/volume" = import ./volume.nix { inherit config; };
- "module/battery" = import ./battery.nix { inherit config; };
+ "module/wifi-separator" = import ./wifi-separator.nix { inherit config; };
+ "module/wifi" = import ./wifi.nix { inherit config; };
+ "module/xwindow" = import ./xwindow.nix { inherit config; };
}
diff --git a/modules/desktop/polybar/module/ethernet-separator.nix b/modules/desktop/polybar/module/ethernet-separator.nix
new file mode 100644
index 0000000..87df6f3
--- /dev/null
+++ b/modules/desktop/polybar/module/ethernet-separator.nix
@@ -0,0 +1,14 @@
+{ config }:
+
+with config.scheme.withHashtag;
+{
+ type = "internal/network";
+ interface = "enp4s0";
+ interface-type = "wired";
+
+ format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} ";
+ format-disconnected = "";
+
+ label-connected = "";
+ label-disconnected = "";
+}
diff --git a/modules/desktop/polybar/module/ethernet.nix b/modules/desktop/polybar/module/ethernet.nix
new file mode 100644
index 0000000..9073c79
--- /dev/null
+++ b/modules/desktop/polybar/module/ethernet.nix
@@ -0,0 +1,14 @@
+{ config }:
+
+with config.scheme.withHashtag;
+{
+ type = "internal/network";
+ interface = "enp4s0";
+ interface-type = "wired";
+
+ format-connected = "%{T2}%{F${base03}}%{F-}%{T-} <label-connected>";
+ format-disconnected = "";
+
+ label-connected = "%netspeed:8%";
+ label-disconnected = "";
+}
diff --git a/modules/desktop/polybar/module/memory.nix b/modules/desktop/polybar/module/memory.nix
index a4aa410..d6ab597 100644
--- a/modules/desktop/polybar/module/memory.nix
+++ b/modules/desktop/polybar/module/memory.nix
@@ -4,6 +4,6 @@ with config.scheme.withHashtag;
{
type = "internal/memory";
interval = 2;
- format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
- label = "%gb_used%";
+ format-prefix = "%{T2}%{F${base03}} %{F-}%{T-} ";
+ label = "%gb_used:9%";
}
diff --git a/modules/desktop/polybar/module/separator.nix b/modules/desktop/polybar/module/separator.nix
index 3cd1430..1434037 100644
--- a/modules/desktop/polybar/module/separator.nix
+++ b/modules/desktop/polybar/module/separator.nix
@@ -3,5 +3,5 @@
with config.scheme.withHashtag;
{
type = "custom/text";
- label = " ";
+ label = " %{F${base03}}%{T3}│%{T-}%{F-} ";
}
diff --git a/modules/desktop/polybar/module/time.nix b/modules/desktop/polybar/module/time.nix
index 71df1a5..2179c09 100644
--- a/modules/desktop/polybar/module/time.nix
+++ b/modules/desktop/polybar/module/time.nix
@@ -4,7 +4,7 @@ with config.scheme.withHashtag;
{
type = "internal/date";
interval = 30;
- time = "%H:%M";
+ time = "%I:%M %p";
label = "%time%";
format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}";
}
diff --git a/modules/desktop/polybar/module/volume.nix b/modules/desktop/polybar/module/volume.nix
index ee18dc0..4dff8fb 100644
--- a/modules/desktop/polybar/module/volume.nix
+++ b/modules/desktop/polybar/module/volume.nix
@@ -5,8 +5,8 @@ with config.scheme.withHashtag;
type = "internal/pulseaudio";
interval = 5;
format-volume = "%{T2}%{F${base03}}<ramp-volume>%{F-}%{T-} <label-volume>";
- label-volume = "%percentage%%";
- label-muted = "%{T2}%{F${base03}} ";
+ label-volume = "%percentage:3%%";
+ label-muted = "%{T2}%{F${base03}} %{F-}%{T-} ";
ramp-volume-0 = " ";
ramp-volume-1 = " ";
ramp-volume-2 = " ";
diff --git a/modules/desktop/polybar/module/wifi-separator.nix b/modules/desktop/polybar/module/wifi-separator.nix
new file mode 100644
index 0000000..4237d84
--- /dev/null
+++ b/modules/desktop/polybar/module/wifi-separator.nix
@@ -0,0 +1,14 @@
+{ config }:
+
+with config.scheme.withHashtag;
+{
+ type = "internal/network";
+ interface = "wlan0";
+ interface-type = "wireless";
+
+ format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} ";
+ format-disconnected = "";
+
+ label-connected = "";
+ label-disconnected = "";
+}
diff --git a/modules/desktop/polybar/module/wifi.nix b/modules/desktop/polybar/module/wifi.nix
new file mode 100644
index 0000000..f244054
--- /dev/null
+++ b/modules/desktop/polybar/module/wifi.nix
@@ -0,0 +1,21 @@
+{ config }:
+
+with config.scheme.withHashtag;
+{
+ type = "internal/network";
+ interface = "wlan0";
+ interface-type = "wireless";
+
+ format-connected = "%{T2}%{F${base03}}<ramp-signal>%{F-}%{T-} <label-connected>";
+ format-disconnected = "";
+
+ label-connected = "%netspeed:8%";
+ label-disconnected = "";
+
+ ramp-signal-0 = "󰢼";
+ ramp-signal-1 = "󰢼";
+ ramp-signal-2 = "󰢽";
+ ramp-signal-3 = "󰢽";
+ ramp-signal-4 = "󰢾";
+ ramp-signal-5 = "󰢾";
+}
diff --git a/modules/desktop/polybar/module/xwindow.nix b/modules/desktop/polybar/module/xwindow.nix
index 58e6cd5..f0614d1 100644
--- a/modules/desktop/polybar/module/xwindow.nix
+++ b/modules/desktop/polybar/module/xwindow.nix
@@ -3,5 +3,5 @@
with config.scheme.withHashtag;
{
type = "internal/xwindow";
- label = "%title:0:40:...%";
+ label = "%title:0:20:...%";
}