From 8325c766ad2e1fdeff86ca0d128ebcd38571d3aa Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Tue, 27 Aug 2024 11:43:06 +0200 Subject: [PATCH] home: Correct battery styling in status bar --- home/config/nil/bar.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/home/config/nil/bar.nix b/home/config/nil/bar.nix index fb987ef..62e727e 100644 --- a/home/config/nil/bar.nix +++ b/home/config/nil/bar.nix @@ -50,12 +50,12 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { min-width: 5mm; } - #battery.5, #battery.10, #battery.15 { - color: ${red}; + #battery.warning { + color: ${yellow}; } - #battery.20, #battery.25, #battery.30 { - color: ${yellow}; + #battery.critical { + color: ${red}; } #temperature.critical { @@ -209,6 +209,11 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { }; battery = { + states = { + warning = 25; + critical = 15; + }; + format = "{icon} {capacity} %"; format-icons = { full = "󱟢";