add battery to waybar

This commit is contained in:
Reid 2024-05-14 18:56:52 -07:00
parent c65eec795e
commit a7a042dd66
2 changed files with 30 additions and 0 deletions

View file

@ -83,6 +83,22 @@ window#waybar.floating #window {
color: @teal; color: @teal;
} }
#battery {
color: @green;
}
#battery.charging {
color: @green;
}
#battery.warning:not(.charging) {
color: @peach;
}
#battery.critical:not(.charging) {
color: @maroon;
}
#pulseaudio { #pulseaudio {
color: @pink; color: @pink;
} }

View file

@ -52,6 +52,7 @@ in {
"cpu" "cpu"
"memory" "memory"
"power-profiles-daemon" "power-profiles-daemon"
"battery"
#"network" #"network"
]; ];
}; };
@ -166,6 +167,19 @@ in {
format = " {percentage}%"; format = " {percentage}%";
tooltip-format = "{used:0.1f}GiB/{avail:0.1f}GiB used\n{swapUsed:0.1f}GiB/{swapAvail:0.1f}GiB swap"; tooltip-format = "{used:0.1f}GiB/{avail:0.1f}GiB used\n{swapUsed:0.1f}GiB/{swapAvail:0.1f}GiB swap";
}; };
battery = {
interval = 30;
states = {
warning = 20;
critical = 10;
};
full-at = 98;
format = "{icon} {capacity}%";
format-icons = ["" "" "" "" ""];
format-critical = " {capacity}%";
tooltip-format = "{timeTo} ({power}W)";
format-charging = " {capacity}%";
};
clock = { clock = {
format = "{:%H:%M}"; format = "{:%H:%M}";
format-alt = "{:%a %b %d %R}"; format-alt = "{:%a %b %d %R}";