From 6222f1edc6730f512ffbb23c934d4ea396e265c5 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Mon, 14 Dec 2015 22:24:20 +0100 Subject: [PATCH] batteryobserver.sh: different sleeping time depending on battery level --- scripts/.config/scripts/batteryobserver.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/.config/scripts/batteryobserver.sh b/scripts/.config/scripts/batteryobserver.sh index 5230cfd..3d13a9c 100755 --- a/scripts/.config/scripts/batteryobserver.sh +++ b/scripts/.config/scripts/batteryobserver.sh @@ -28,6 +28,12 @@ while true; do fi ;; esac - sleep 2m + if [ $level -gt 50 ]; then + sleep 40m + elif [ $level -gt 30 ]; then + sleep 10m + else + sleep 2m + fi done