From 170461002890d55718618bec64feaa8856c3a6d4 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Fri, 28 Nov 2025 00:01:27 +0530 Subject: Organised the configuration to allow for different options for different users. --- modules/graphical/polybar/bar/default.nix | 5 --- modules/graphical/polybar/bar/main.nix | 44 -------------------------- modules/graphical/polybar/default.nix | 20 ------------ modules/graphical/polybar/module/battery.nix | 36 --------------------- modules/graphical/polybar/module/bspwm.nix | 21 ------------ modules/graphical/polybar/module/cpu.nix | 9 ------ modules/graphical/polybar/module/date.nix | 10 ------ modules/graphical/polybar/module/default.nix | 13 -------- modules/graphical/polybar/module/memory.nix | 9 ------ modules/graphical/polybar/module/separator.nix | 7 ---- modules/graphical/polybar/module/time.nix | 10 ------ modules/graphical/polybar/module/volume.nix | 13 -------- modules/graphical/polybar/module/xwindow.nix | 7 ---- 13 files changed, 204 deletions(-) delete mode 100644 modules/graphical/polybar/bar/default.nix delete mode 100644 modules/graphical/polybar/bar/main.nix delete mode 100644 modules/graphical/polybar/default.nix delete mode 100644 modules/graphical/polybar/module/battery.nix delete mode 100644 modules/graphical/polybar/module/bspwm.nix delete mode 100644 modules/graphical/polybar/module/cpu.nix delete mode 100644 modules/graphical/polybar/module/date.nix delete mode 100644 modules/graphical/polybar/module/default.nix delete mode 100644 modules/graphical/polybar/module/memory.nix delete mode 100644 modules/graphical/polybar/module/separator.nix delete mode 100644 modules/graphical/polybar/module/time.nix delete mode 100644 modules/graphical/polybar/module/volume.nix delete mode 100644 modules/graphical/polybar/module/xwindow.nix (limited to 'modules/graphical/polybar') diff --git a/modules/graphical/polybar/bar/default.nix b/modules/graphical/polybar/bar/default.nix deleted file mode 100644 index 23a43c4..0000000 --- a/modules/graphical/polybar/bar/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib }: - -{ - "bar/main" = import ./main.nix { inherit config lib; }; -} diff --git a/modules/graphical/polybar/bar/main.nix b/modules/graphical/polybar/bar/main.nix deleted file mode 100644 index 326b768..0000000 --- a/modules/graphical/polybar/bar/main.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ config, lib }: - -with config.scheme.withHashtag; -let - largerFontSize = toString (builtins.ceil (config.fonts.size * 9.0 / 8.0)); -in { - width = "100%:-20"; - fixed-center = false; - height = 35; - override-redirect = false; - wm-restack = "bspwm"; - enable-ipc = true; - - border-top-size = 1; - border-bottom-size = 1; - border-left-size = 1; - border-right-size = 1; - border-color = base03; - - background = base00; - foreground = base05; - - line-size = 3; - line-color = base08; - - padding-left = 1; - padding-right = 1; - - module-margin-left = 1; - module-margin-right = 1; - - separator = "%{F${base03}}%{T3}│%{T-}%{F-}"; - - offset-x = "10"; - offset-y = "10"; - - font-0 = "${config.fonts.normal}:pixelsize=${toString config.fonts.size};3"; - font-1 = "${config.fonts.normal}:weight=Bold:pixelsize=${largerFontSize};3"; - font-2 = "${config.fonts.normal}:style=Light:pixelsize=${largerFontSize};2"; - - modules-left = "bspwm separator"; - modules-center = "xwindow"; - modules-right = "separator volume battery time memory cpu date"; -} diff --git a/modules/graphical/polybar/default.nix b/modules/graphical/polybar/default.nix deleted file mode 100644 index d96c2ae..0000000 --- a/modules/graphical/polybar/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = lib.mkIf config.graphical.enable { - services.polybar.enable = true; - services.polybar.package = (pkgs.polybar.override { - pulseSupport = true; - }); - services.polybar.script = "${config.services.polybar.package}/bin/polybar main &"; - services.polybar.config = lib.mkMerge [ - (import ./bar { inherit config lib; }) - (import ./module { inherit config lib; }) - { - settings = { - screenchange-reload = true; - }; - } - ]; - }; -} diff --git a/modules/graphical/polybar/module/battery.nix b/modules/graphical/polybar/module/battery.nix deleted file mode 100644 index 5787f24..0000000 --- a/modules/graphical/polybar/module/battery.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/battery"; - battery = "BAT1"; - adapter = "ADP1"; - - format-charging = "%{T2}%{F${base03}}%{F-}%{T-} "; - format-discharging = "%{T2}%{F${base03}}%{F-}%{T-} "; - format-full-prefix = "󰁹 "; - - ramp-capacity-0 = "󰁺"; - ramp-capacity-1 = "󰁻"; - ramp-capacity-2 = "󰁼"; - ramp-capacity-3 = "󰁽"; - ramp-capacity-4 = "󰁾"; - ramp-capacity-5 = "󰁿"; - ramp-capacity-6 = "󰂀"; - ramp-capacity-7 = "󰂁"; - ramp-capacity-8 = "󰂂"; - ramp-capacity-9 = "󰁹"; - - animation-charging-0 = "󰁺"; - animation-charging-1 = "󰁻"; - animation-charging-2 = "󰁼"; - animation-charging-3 = "󰁽"; - animation-charging-4 = "󰁾"; - animation-charging-5 = "󰁿"; - animation-charging-6 = "󰂀"; - animation-charging-7 = "󰂁"; - animation-charging-8 = "󰂂"; - animation-charging-9 = "󰁹"; - - animation-charging-framerate = 750; -} diff --git a/modules/graphical/polybar/module/bspwm.nix b/modules/graphical/polybar/module/bspwm.nix deleted file mode 100644 index ed82946..0000000 --- a/modules/graphical/polybar/module/bspwm.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/bspwm"; - - label-focused = "%index%"; - label-focused-underline = "${base0D}"; - label-focused-padding = 2; - - label-occupied = "%index%"; - label-occupied-padding = 2; - - label-urgent = "%index%"; - label-urgent-underline = "${base08}"; - label-urgent-padding = 2; - - label-empty = "%index%"; - label-empty-foreground = "${base03}"; - label-empty-padding = 2; -} diff --git a/modules/graphical/polybar/module/cpu.nix b/modules/graphical/polybar/module/cpu.nix deleted file mode 100644 index 8134df1..0000000 --- a/modules/graphical/polybar/module/cpu.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/cpu"; - interval = 2; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; - label = "%percentage%%"; -} diff --git a/modules/graphical/polybar/module/date.nix b/modules/graphical/polybar/module/date.nix deleted file mode 100644 index 9c56121..0000000 --- a/modules/graphical/polybar/module/date.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 60; - date = "%d/%m/%Y"; - label = "%date%"; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; -} diff --git a/modules/graphical/polybar/module/default.nix b/modules/graphical/polybar/module/default.nix deleted file mode 100644 index fe5b8a1..0000000 --- a/modules/graphical/polybar/module/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib }: - -{ - "module/separator" = import ./separator.nix { inherit config; }; - "module/xwindow" = import ./xwindow.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/time" = import ./time.nix { inherit config; }; - "module/volume" = import ./volume.nix { inherit config; }; - "module/battery" = import ./battery.nix { inherit config; }; -} diff --git a/modules/graphical/polybar/module/memory.nix b/modules/graphical/polybar/module/memory.nix deleted file mode 100644 index a4aa410..0000000 --- a/modules/graphical/polybar/module/memory.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/memory"; - interval = 2; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; - label = "%gb_used%"; -} diff --git a/modules/graphical/polybar/module/separator.nix b/modules/graphical/polybar/module/separator.nix deleted file mode 100644 index 3cd1430..0000000 --- a/modules/graphical/polybar/module/separator.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "custom/text"; - label = " "; -} diff --git a/modules/graphical/polybar/module/time.nix b/modules/graphical/polybar/module/time.nix deleted file mode 100644 index 71df1a5..0000000 --- a/modules/graphical/polybar/module/time.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 30; - time = "%H:%M"; - label = "%time%"; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; -} diff --git a/modules/graphical/polybar/module/volume.nix b/modules/graphical/polybar/module/volume.nix deleted file mode 100644 index ee18dc0..0000000 --- a/modules/graphical/polybar/module/volume.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/pulseaudio"; - interval = 5; - format-volume = "%{T2}%{F${base03}}%{F-}%{T-} "; - label-volume = "%percentage%%"; - label-muted = "%{T2}%{F${base03}} "; - ramp-volume-0 = " "; - ramp-volume-1 = " "; - ramp-volume-2 = " "; -} diff --git a/modules/graphical/polybar/module/xwindow.nix b/modules/graphical/polybar/module/xwindow.nix deleted file mode 100644 index 833899e..0000000 --- a/modules/graphical/polybar/module/xwindow.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/xwindow"; - label = "%title:0:30:...%"; -} -- cgit v1.2.3