Add hibernate to battery script at less than 5%
This commit is contained in:
@@ -22,8 +22,13 @@ else
|
|||||||
elif [[ $capacity -ge 10 ]]
|
elif [[ $capacity -ge 10 ]]
|
||||||
then
|
then
|
||||||
status=""
|
status=""
|
||||||
|
elif [[ $capacity -gt 5 ]]
|
||||||
|
then
|
||||||
|
notify-send -u critical "Charge now! (will hibernate at 5%)"
|
||||||
|
status=""
|
||||||
else
|
else
|
||||||
notify-send -u critical "Charge now!"
|
notify-send -u critical "Hibernating..."
|
||||||
|
systemctl hibernate
|
||||||
status=""
|
status=""
|
||||||
fi
|
fi
|
||||||
echo "$status $capacity% $time_left"
|
echo "$status $capacity% $time_left"
|
||||||
|
|||||||
Reference in New Issue
Block a user