From a49ff589fa6d48a802327ee940674bfa44b05211 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sat, 7 Sep 2024 19:23:46 -0700 Subject: [PATCH] When wireless device is asleep (charge 0), don't change dock color --- projects/razer-bat/razer-bat.sh | 3 +++ 1 file changed, 3 insertions(+) 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" }