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,
#battery,
#battery.bat2,
#cpu,
#memory,
#temperature,

View file

@ -138,7 +138,7 @@ $character'';
height = 30;
modules-left = [ "hyprland/workspaces" ];
#modules-center = [ "hyprland/window" ];
modules-right = [ "tray" "network" "battery" "clock" ];
modules-right = [ "tray" "network" "battery" "battery#bat2" "clock" ];
"tray" = {
"icon-size" = 21;
};
@ -149,13 +149,24 @@ $character'';
"max-length" = 50;
};
"battery" = {
"bat" = "BAT1";
"interval" = 60;
"bat" = "BAT0";
"interval" = 10;
"states" = {
"warning" = 30;
"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" = ''["", "", "", "", ""]'';
"max-length" = 25;
};