aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-05-15 16:25:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-05-15 16:25:46 -0300
commit9672b0581cba2cd226ac199e62b3c106921d771c (patch)
treed9b2a5c20ad94c15f3935c6ef75aa4046e0b324e
parent313fd5c1a5da506ff7f1db40bbdcc31dbcaee81b (diff)
downloadscripts-9672b0581cba2cd226ac199e62b3c106921d771c.tar.gz
scripts-9672b0581cba2cd226ac199e62b3c106921d771c.tar.bz2
Set battery level indication based on rounded charge value
-rwxr-xr-xbattery2
1 files changed, 1 insertions, 1 deletions
diff --git a/battery b/battery
index 487610b..0fe1aeb 100755
--- a/battery
+++ b/battery
@@ -43,7 +43,7 @@ else
fi
# Set battery level indication
-if (($charge <= 25)); then
+if ((`echo $charge | cut -d ',' -f 1` <= 25)); then
chargeColor=$low
else
chargeColor=$healthy