diff --git a/projects/razer-bat/razer-bat.sh b/projects/razer-bat/razer-bat.sh index fd002cef..f63d677c 100755 --- a/projects/razer-bat/razer-bat.sh +++ b/projects/razer-bat/razer-bat.sh @@ -75,6 +75,9 @@ function get_charge_percentage() { tr -s ' ' |\ cut -d' ' -f3 ) + if [[ $CHARGE == '0' ]]; then + exit 0 + fi echo "CHARGE: $CHARGE" >&2 echo "$CHARGE" }