From 4d02405ac229ccc8a2ceefaaafd591c143125443 Mon Sep 17 00:00:00 2001 From: janabhumi Date: Sat, 1 Oct 2022 17:35:36 +0300 Subject: [PATCH] home/polybar: add battery --- home/ui/polybar/config.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/home/ui/polybar/config.nix b/home/ui/polybar/config.nix index 76de677..5a2e12e 100644 --- a/home/ui/polybar/config.nix +++ b/home/ui/polybar/config.nix @@ -26,12 +26,13 @@ in font = [ "Fira Code:size=9:antialias=true" "Fira Code:bold:size=0:antialias=true" + "FiraCode Nerd Font Mono:size=16:antialias=true" ]; radius = 0; modules = { left = "xmonad"; center = "date wifi_home wifi_laptop"; - right = "exchangerate volume lang time"; + right = "exchangerate volume battery lang time"; }; }; @@ -72,6 +73,22 @@ in }; }; + "module/battery" = { + type = "internal/battery"; + full-at = 99; + low-at = 10; + battery = "BAT0"; + adapter = "AC0"; + + format.discharging = { + text = "%{T3}%{T-} "; + padding = 1; + }; + + # Only applies if is used + ramp.capacity = [ "" "" "" "" "" ]; + }; + "module/wifi_home" = mkWifi "wlp11s0f3u2"; "module/wifi_laptop" = mkWifi "wlp2s0"; @@ -89,7 +106,6 @@ in prefix = "USD: "; padding = 1; }; - }; "global/wm" = {