make polybar capable of multiple batteries

This commit is contained in:
Schrottkatze 2024-02-15 18:48:18 +01:00
parent 93c2b01aea
commit b579577978
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc

View file

@ -39,7 +39,7 @@
separator-foreground = "\${colors.disabled}";
font-0 = "FiraCode Nerd Font";
modules-left = "xworkspaces xwindow";
modules-right = "memory cpu wlan battery";
modules-right = "memory cpu wlan bat0 bat1";
cursor-click = "pointer";
cursor-scroll = "ns-resize";
enable-ipc = true;
@ -103,12 +103,9 @@
interface-type = "wireless";
label-connected = "%{F#F0C674}%{F-} %local_ip%";
};
"module/battery" = {
"battery-base" = {
type = "internal/battery";
poll-interval = 1;
battery = "BAT0";
adapter = "ADP1";
time-format = "%H%{F#7c6f64}:%{F#d5c4a1}%M";
label-charging = "%{F#98971a}󰚥 %{F#ebdbb2}%percentage%%%{F#d5c4a1} %time%";
format-charging = "<ramp-capacity> <label-charging>";
@ -131,6 +128,16 @@
"%{F#98971a}󰁹"
];
};
"module/bat0" = {
"inherit" = "battery-base";
battery = "BAT0";
adapter = "ADP1";
};
"module/bat1" = {
"inherit" = "battery-base";
battery = "BAT1";
adapter = "ADP1";
};
"settings" = {
screenchange-reload = true;