aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-17 22:13:35 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-17 22:13:35 -0500
commit17e0bbaecb917b7cb42453afa9cd7e80e092c087 (patch)
tree3da04e24c906894938e3ac4acb17b82660c45c4b
parent60e0bae28e5bb53652802a3779dc604c75906208 (diff)
downloadlowbat-17e0bbaecb917b7cb42453afa9cd7e80e092c087.tar.xz
lowbat-17e0bbaecb917b7cb42453afa9cd7e80e092c087.zip
output newlines instead of carriage returns to make lowbat more versatile
-rw-r--r--lowbat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lowbat.c b/lowbat.c
index bfdadf2..572873a 100644
--- a/lowbat.c
+++ b/lowbat.c
@@ -154,7 +154,7 @@ int main() {
}
if (discharging != old_discharging || capacity != old_capacity) {
- printf("\r%s%d%%", discharging ? "-" : "+", capacity);
+ printf("%s%d%%\n", discharging ? "-" : "+", capacity);
fflush(stdout);
}
old_discharging = discharging;