make polybar capable of multiple batteries
This commit is contained in:
parent
93c2b01aea
commit
b579577978
1 changed files with 12 additions and 5 deletions
|
@ -39,7 +39,7 @@
|
||||||
separator-foreground = "\${colors.disabled}";
|
separator-foreground = "\${colors.disabled}";
|
||||||
font-0 = "FiraCode Nerd Font";
|
font-0 = "FiraCode Nerd Font";
|
||||||
modules-left = "xworkspaces xwindow";
|
modules-left = "xworkspaces xwindow";
|
||||||
modules-right = "memory cpu wlan battery";
|
modules-right = "memory cpu wlan bat0 bat1";
|
||||||
cursor-click = "pointer";
|
cursor-click = "pointer";
|
||||||
cursor-scroll = "ns-resize";
|
cursor-scroll = "ns-resize";
|
||||||
enable-ipc = true;
|
enable-ipc = true;
|
||||||
|
@ -103,12 +103,9 @@
|
||||||
interface-type = "wireless";
|
interface-type = "wireless";
|
||||||
label-connected = "%{F#F0C674}%{F-} %local_ip%";
|
label-connected = "%{F#F0C674}%{F-} %local_ip%";
|
||||||
};
|
};
|
||||||
|
"battery-base" = {
|
||||||
"module/battery" = {
|
|
||||||
type = "internal/battery";
|
type = "internal/battery";
|
||||||
poll-interval = 1;
|
poll-interval = 1;
|
||||||
battery = "BAT0";
|
|
||||||
adapter = "ADP1";
|
|
||||||
time-format = "%H%{F#7c6f64}:%{F#d5c4a1}%M";
|
time-format = "%H%{F#7c6f64}:%{F#d5c4a1}%M";
|
||||||
label-charging = "%{F#98971a} %{F#ebdbb2}%percentage%%%{F#d5c4a1} %time%";
|
label-charging = "%{F#98971a} %{F#ebdbb2}%percentage%%%{F#d5c4a1} %time%";
|
||||||
format-charging = "<ramp-capacity> <label-charging>";
|
format-charging = "<ramp-capacity> <label-charging>";
|
||||||
|
@ -131,6 +128,16 @@
|
||||||
"%{F#98971a}"
|
"%{F#98971a}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
"module/bat0" = {
|
||||||
|
"inherit" = "battery-base";
|
||||||
|
battery = "BAT0";
|
||||||
|
adapter = "ADP1";
|
||||||
|
};
|
||||||
|
"module/bat1" = {
|
||||||
|
"inherit" = "battery-base";
|
||||||
|
battery = "BAT1";
|
||||||
|
adapter = "ADP1";
|
||||||
|
};
|
||||||
|
|
||||||
"settings" = {
|
"settings" = {
|
||||||
screenchange-reload = true;
|
screenchange-reload = true;
|
||||||
|
|
Loading…
Reference in a new issue