summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-05-31 11:39:49 +0930
committerDaniel Jones <admin@danieljon.es>2020-05-31 11:40:17 +0930
commit107190c69fc44f077331db4f6aacd26d549be113 (patch)
treeaf63b306ba958970170c7fef4f137a1c719fcf13
parent8ec20f5875f420e80c4daf0c63d5cf5772727275 (diff)
downloadbinstatus-master.tar.gz
binstatus-master.zip
add 1 to battery percentHEADmaster
i stop charging at 70%. it use to sit on 69% which is dumb
-rw-r--r--components.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/components.c b/components.c
index f00619b..fbe6d32 100644
--- a/components.c
+++ b/components.c
@@ -151,7 +151,8 @@ char *battery(char *store, size_t size, int flag)
fread(cap, 1, 4, capacity);
fclose(capacity);
int percent = atoi(cap);
-
+ if (percent != 100)
+ percent++;
if ( !has_low_batt && percent < LOWBATT)
{
run(LOWBATTERY);