[le/lt]
This commit is contained in:
parent
f6905d27e8
commit
9cfe373129
|
@ -626,14 +626,14 @@ in rec {
|
||||||
acpi -b | grep "Battery 0" | awk -F'[,:%]' '{print $2, $3}' | {
|
acpi -b | grep "Battery 0" | awk -F'[,:%]' '{print $2, $3}' | {
|
||||||
read -r status capacity
|
read -r status capacity
|
||||||
|
|
||||||
if [ "$status" = Discharging -a "$capacity" -lt 2 ]; then
|
if [ "$status" = Discharging -a "$capacity" -le 2 ]; then
|
||||||
dunstify -u critical -a batMon \
|
dunstify -u critical -a batMon \
|
||||||
-h string:x-dunst-stack-tag:batMon \
|
-h string:x-dunst-stack-tag:batMon \
|
||||||
-h int:value:"$capacity" "Battery Critical: ''${capacity}%
|
-h int:value:"$capacity" "Battery Critical: ''${capacity}%
|
||||||
Hibernating"
|
Hibernating"
|
||||||
sleep 5
|
sleep 5
|
||||||
systemctl hibernate
|
systemctl hibernate
|
||||||
elif [ "$status" = Discharging -a "$capacity" -lt 5 ]; then
|
elif [ "$status" = Discharging -a "$capacity" -le 5 ]; then
|
||||||
dunstify -u critical -a batMon \
|
dunstify -u critical -a batMon \
|
||||||
-h string:x-dunst-stack-tag:batMon \
|
-h string:x-dunst-stack-tag:batMon \
|
||||||
-h int:value:"$capacity" "Battery Critical: ''${capacity}%"
|
-h int:value:"$capacity" "Battery Critical: ''${capacity}%"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user