fix up battery-low-timer
This commit is contained in:
parent
151edaab9b
commit
c29434338f
|
@ -9,15 +9,15 @@
|
||||||
startAt = "*08:00:00";
|
startAt = "*08:00:00";
|
||||||
script = ''
|
script = ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ `acpi -b | grep "Battery 2" | awk ' { print ($3)}'` == "Discharging," ] ; then
|
if [ `acpi -b | grep "Battery 0" | awk ' { print ($3)}'` == "Discharging," ] ; then
|
||||||
# Discharging
|
# Discharging
|
||||||
# Monitor for low battery
|
# Monitor for low battery
|
||||||
if [ `acpi -b | grep "Battery 2" | awk ' { print ($4)-0}'` -le "15" ] ; then
|
if [ `acpi -b | grep "Battery 0" | awk ' { print ($4)-0}'` -le "15" ] ; then
|
||||||
notify-send "Battery Low";
|
notify-send -u critical "Battery Low";
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Charging
|
# Charging
|
||||||
if [ `acpi -b | grep "Battery 2" | awk ' { print ($4)-0}'` -ge "98" ] ; then
|
if [ `acpi -b | grep "Battery 0" | awk ' { print ($4)-0}'` -ge "94" ] ; then
|
||||||
# Fully charged
|
# Fully charged
|
||||||
notify-send "Battery Full"
|
notify-send "Battery Full"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue