add battery indicator

This commit is contained in:
Frost-Phoenix 2024-04-13 18:27:49 +02:00
parent c954eca45c
commit 52b0261f2c
2 changed files with 20 additions and 2 deletions

View file

@ -21,11 +21,12 @@
"memory"
"disk"
"pulseaudio"
"battery"
"network"
];
clock= {
calendar = {
format = { today = "<span color='#b4befe'><b>{}</b></span>"; };
format = { today = "<span color='#b4befe'><b>{}</b>"; };
};
format = " {:%H:%M}";
tooltip= "true";
@ -91,6 +92,19 @@
scroll-step= 5;
on-click= "pamixer -t";
};
battery = {
format = "{icon} {capacity}% - {time}";
format-icons = ["" "" "" "" ""];
format-time = "{H}h{M}m";
format-charging = " {icon} {capacity}%";
format-full = " {icon} {capacity}%";
interval = 30;
states = {
warning = 20;
critical = 5;
};
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
};
"custom/launcher"= {
format= "";
on-click= "pkill wofi || wofi --show drun";

View file

@ -45,7 +45,7 @@ in
color: #b4befe;
}
#tray, #pulseaudio, #network, #cpu, #memory, #disk, #clock {
#tray, #pulseaudio, #network, #cpu, #memory, #disk, #clock, #battery {
font-size: ${custom.font_size};
color: ${custom.text_color};
}
@ -74,6 +74,10 @@ in
padding-right: 9px;
margin-left: 7px;
}
#battery {
padding-left: 9px;
padding-right: 9px;
}
#network {
padding-left: 9px;
padding-right: 15px;