Multi-battery support for waybar

This commit is contained in:
xqtc161 2024-03-03 14:27:47 +01:00
parent 96407b6ed5
commit 0b85edb827
2 changed files with 16 additions and 4 deletions

View file

@ -78,6 +78,7 @@ window#waybar {
#clock, #clock,
#battery, #battery,
#battery.bat2,
#cpu, #cpu,
#memory, #memory,
#temperature, #temperature,

View file

@ -138,7 +138,7 @@ $character'';
height = 30; height = 30;
modules-left = [ "hyprland/workspaces" ]; modules-left = [ "hyprland/workspaces" ];
#modules-center = [ "hyprland/window" ]; #modules-center = [ "hyprland/window" ];
modules-right = [ "tray" "network" "battery" "clock" ]; modules-right = [ "tray" "network" "battery" "battery#bat2" "clock" ];
"tray" = { "tray" = {
"icon-size" = 21; "icon-size" = 21;
}; };
@ -149,13 +149,24 @@ $character'';
"max-length" = 50; "max-length" = 50;
}; };
"battery" = { "battery" = {
"bat" = "BAT1"; "bat" = "BAT0";
"interval" = 60; "interval" = 10;
"states" = { "states" = {
"warning" = 30; "warning" = 30;
"critical" = 15; "critical" = 15;
}; };
"format" = " BAT: {capacity}%"; "format" = " BAT IN: {capacity}%";
#"format-icons" = ''["", "", "", "", ""]'';
"max-length" = 25;
};
"battery#bat2" = {
"bat" = "BAT1";
"interval" = 10;
"states" = {
"warning" = 30;
"critical" = 15;
};
"format" = " BAT EX: {capacity}%";
#"format-icons" = ''["", "", "", "", ""]''; #"format-icons" = ''["", "", "", "", ""]'';
"max-length" = 25; "max-length" = 25;
}; };