From e0a8c461c7a8417a0de66a2b2a6579cccd02d1e3 Mon Sep 17 00:00:00 2001 From: u Date: Sun, 9 Apr 2023 10:46:06 -0400 Subject: use bash builtin sleep --- go.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/go.sh b/go.sh index d68c002..da662ec 100755 --- a/go.sh +++ b/go.sh @@ -1,5 +1,5 @@ -#!/bin/sh -capacity_threshold=90 +#!/bin/bash +capacity_threshold=50 battery_dir=/sys/class/power_supply/BAT0 status_file=$battery_dir/status @@ -43,6 +43,13 @@ go() main() { + if [ -e /usr/lib/bash/sleep ] + then + enable -f /usr/lib/bash/sleep sleep + else + echo 'Warning: not found: /usr/lib/bash/sleep (try: "sudo apt install bash-builtins")' >&2 + fi + while true do go -- cgit v1.2.3