From 107190c69fc44f077331db4f6aacd26d549be113 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sun, 31 May 2020 11:39:49 +0930 Subject: add 1 to battery percent i stop charging at 70%. it use to sit on 69% which is dumb --- components.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3