aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2019-11-15 10:25:08 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2019-11-15 10:25:08 +0100
commitbe9d8bfdbffc4f6ab670b55499b3ef95f97bc27e (patch)
treef9d91b874b0cda641323e6bde079fd643707dc13
parentNow handles no-audio (diff)
downloadlowbat-gnu-be9d8bfdbffc4f6ab670b55499b3ef95f97bc27e.tar.gz
lowbat-gnu-be9d8bfdbffc4f6ab670b55499b3ef95f97bc27e.tar.bz2
lowbat-gnu-be9d8bfdbffc4f6ab670b55499b3ef95f97bc27e.tar.xz
lowbat-gnu-be9d8bfdbffc4f6ab670b55499b3ef95f97bc27e.tar.zst
lowbat-gnu-be9d8bfdbffc4f6ab670b55499b3ef95f97bc27e.zip
Renamed --no-audio to --silent
-rwxr-xr-xbin/lowbat4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/lowbat b/bin/lowbat
index 99836a0..3bf4cc5 100755
--- a/bin/lowbat
+++ b/bin/lowbat
@@ -8,7 +8,7 @@ fi
notify() {
notify-send "Low battery: $batlvl%" "Please plug in computer" -u critical -t 15000
- if [ ! "$message" = "no-audio" ]; then
+ if [ ! "$message" = "--silent" ]; then
echo "$message" | espeak
fi
}
@@ -16,7 +16,7 @@ notify() {
while [ 1 ]; do
acstat=$(acpi | awk '{print $3}' | rev | cut -c 2- | rev)
batlvl=$(acpi | awk '{print $4}' | rev | cut -c 3- | rev)
- if [ $batlvl -lt 15 ]; then
+ if [ $batlvl -lt 115 ]; then
while [ "$acstat" = "Discharging" ]; do
$(notify)
sleep 20