From 17e0bbaecb917b7cb42453afa9cd7e80e092c087 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Thu, 17 Oct 2024 22:13:35 -0500 Subject: output newlines instead of carriage returns to make lowbat more versatile --- lowbat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3