home/polybar: add battery

This commit is contained in:
Dmitriy Pleshevskiy 2022-10-01 17:35:36 +03:00
parent 205967b6c3
commit 4d02405ac2
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -26,12 +26,13 @@ in
font = [ font = [
"Fira Code:size=9:antialias=true" "Fira Code:size=9:antialias=true"
"Fira Code:bold:size=0:antialias=true" "Fira Code:bold:size=0:antialias=true"
"FiraCode Nerd Font Mono:size=16:antialias=true"
]; ];
radius = 0; radius = 0;
modules = { modules = {
left = "xmonad"; left = "xmonad";
center = "date wifi_home wifi_laptop"; 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}<ramp-capacity>%{T-} <label-discharging>";
padding = 1;
};
# Only applies if <ramp-capacity> is used
ramp.capacity = [ "" "" "" "" "" ];
};
"module/wifi_home" = mkWifi "wlp11s0f3u2"; "module/wifi_home" = mkWifi "wlp11s0f3u2";
"module/wifi_laptop" = mkWifi "wlp2s0"; "module/wifi_laptop" = mkWifi "wlp2s0";
@ -89,7 +106,6 @@ in
prefix = "USD: "; prefix = "USD: ";
padding = 1; padding = 1;
}; };
}; };
"global/wm" = { "global/wm" = {