tConvert battery time to hours and minutes - spoon - dwm status utility (2f30 f… | |
git clone git://src.adamsgaard.dk/spoon | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 23e70d20df554efddac0407f3200b42a17f68168 | |
parent d500745cb3de6d6c475ccdccd96e7919bd56720e | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 17 Apr 2020 21:53:32 +0200 | |
Convert battery time to hours and minutes | |
Diffstat: | |
M batt.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/batt.c b/batt.c | |
t@@ -17,7 +17,7 @@ battprint(char *buf, size_t len, int acon, int life, int rem… | |
c = acon ? '=' : ' '; | |
if (c == ' ') | |
- snprintf(buf, len, "%d%% %d min", life, remain); | |
+ snprintf(buf, len, "%d%% %d:%02d", life, remain/60, remain%60); | |
else | |
snprintf(buf, len, "%d%%", life); | |