battery: set critical to 20% in waybar and check script

This commit is contained in:
Benjamin Yule Bädorf 2024-03-27 11:37:07 +01:00
parent 03b7e423cc
commit 72aa907ebd
Signed by: b12f
GPG key ID: 729956E1124F8F26
2 changed files with 2 additions and 2 deletions

View file

@ -56,7 +56,7 @@ in {
battery = { battery = {
tooltip = false; tooltip = false;
states = { states = {
critical = 25; critical = 20;
}; };
full-at = 90; full-at = 90;
format = "<span font='12'>{icon}</span> {capacity}%"; format = "<span font='12'>{icon}</span> {capacity}%";

View file

@ -6,7 +6,7 @@ if [ $status != "Discharging" ]; then
fi fi
capacity=$(cat /sys/class/power_supply/BAT0/capacity) capacity=$(cat /sys/class/power_supply/BAT0/capacity)
if [ $capacity -lt 15 ]; then if [ $capacity -lt 20 ]; then
${libnotify}/bin/notify-send -u critical "Battery ''${capacity}%" ${libnotify}/bin/notify-send -u critical "Battery ''${capacity}%"
fi fi
'' ''