]> gitweb.fluxo.info Git - scripts.git/commitdiff
Set battery level indication based on rounded charge value
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 15 May 2014 19:25:46 +0000 (16:25 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 15 May 2014 19:25:46 +0000 (16:25 -0300)
battery

diff --git a/battery b/battery
index 487610ba043f116e1188cb4586c577d96084f370..0fe1aebd19a6a8146d23fff0b9932c9b5f23b67a 100755 (executable)
--- 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