aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2020-12-30 22:27:33 +0000
committerTomasz Kramkowski <tk@the-tk.com>2020-12-30 22:27:33 +0000
commitc560f0f02ddf51a3ce38a945b48ecf49a138e38d (patch)
treed737adbd10e3506df148f8b654c1dc5271f5c6e2 /conf
parent2709a996bbce438f4ca94256441b705fe9e534f6 (diff)
downloadbattd-c560f0f02ddf51a3ce38a945b48ecf49a138e38d.tar.gz
battd-c560f0f02ddf51a3ce38a945b48ecf49a138e38d.tar.xz
battd-c560f0f02ddf51a3ce38a945b48ecf49a138e38d.zip
Simpler and more flexible interval handling
Diffstat (limited to 'conf')
-rw-r--r--conf8
1 files changed, 7 insertions, 1 deletions
diff --git a/conf b/conf
index cff836d..e538b60 100644
--- a/conf
+++ b/conf
@@ -1,4 +1,10 @@
battery=/sys/class/power_supply/BAT0/uevent
-interval() { ./battcheck min_time=1200 min_pct=16 "$battery"; }
+interval() {
+ if ./battcheck min_time=1200 min_pct=16 "$battery"; then
+ sleep 300
+ else
+ sleep 30
+ fi
+}
check() { ./battcheck min_time=600 min_pct=8 "$battery"; }
failed() { zzz -H; }