diff --git a/modules/desktop/wm.nix b/modules/desktop/wm.nix index fcc6735..82e69ec 100644 --- a/modules/desktop/wm.nix +++ b/modules/desktop/wm.nix @@ -287,19 +287,31 @@ in cpu = { interval = 1; - format = " {usage}%"; + states = { + warning = 60; + critical = 85; + }; + format = "󰍛 {usage}%"; tooltip = false; }; memory = { interval = 1; - format = " {percentage}%"; + states = { + warning = 70; + critical = 90; + }; + format = "󰘚 {percentage}%"; tooltip = false; }; disk = { interval = 60; - format = " {free}"; + states = { + warning = 75; + critical = 90; + }; + format = "󰋊 {free}"; tooltip = false; }; @@ -309,6 +321,25 @@ in tooltip = false; }; + battery = { + states = { + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-charging = "󱐋 {capacity}%"; + format-plugged = " {capacity}%"; + format-full = ""; + format-icons = [ + "" + "" + "" + "" + "" + ]; + tooltip-format = "{timeTo}"; + }; + }; }; style = '' @@ -362,11 +393,38 @@ in #cpu, #memory, #disk, + #battery, #clock { padding: 0 5px; margin: 0 5px; color: #83a598; } + + #battery.charging, + #battery.plugged, + #battery.full { + color: #b8bb26; + } + + #battery.warning:not(.charging) { + color: #fabd2f; + } + + #cpu.warning, + #memory.warning, + #disk.warning { + color: #fabd2f; + } + + #battery.critical:not(.charging) { + color: #fb4934; + } + + #cpu.critical, + #memory.critical, + #disk.critical { + color: #fb4934; + } ''; package = pkgs.waybar.override { wireplumberSupport = false; }; };