battery=/sys/class/power_supply/BAT0/uevent 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; }