battery: set critical to 20% in waybar and check script
This commit is contained in:
parent
03b7e423cc
commit
72aa907ebd
|
@ -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}%";
|
||||||
|
|
|
@ -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
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue