From ffbbb00e76f1b57249dd817be364e4c5698d341d Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Mon, 27 Mar 2023 22:29:00 +0200 Subject: [PATCH] Configure polybar's battery module --- modules/desktop/polybar.nix | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/modules/desktop/polybar.nix b/modules/desktop/polybar.nix index 0fffacc..e7f6fa6 100644 --- a/modules/desktop/polybar.nix +++ b/modules/desktop/polybar.nix @@ -246,10 +246,36 @@ in { format-paused-prefix-font = 2; format-paused-foreground = "\${colors.fg-alt}"; }); + "module/battery" = { + type = "internal/battery"; + battery = "BAT0"; + adapter = "AC"; + + format-charging = " "; + format-discharging = " "; + + ramp-capacity-0 = ""; + ramp-capacity-1 = ""; + ramp-capacity-2 = ""; + ramp-capacity-3 = ""; + ramp-capacity-4 = ""; + + ramp-capacity-font = 2; + + ramp-capacity-0-foreground = "\${colors.red}"; + ramp-capacity-1-foreground = "\${colors.yellow}"; + ramp-capacity-2-foreground = "\${colors.fg-alt}"; + + animation-charging-0 = ""; + animation-charging-1 = ""; + animation-charging-2 = ""; + animation-charging-3 = ""; + animation-charging-4 = ""; + + animation-charging-font = 2; + }; }; }; - }; - }; }