aboutsummaryrefslogtreecommitdiff
path: root/lowbat.c
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2024-09-12 14:01:09 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2024-09-12 14:01:09 -0500
commitb16a818cd0918845ea899bb913ce4320a606a510 (patch)
treee1256eb47e2270e49138949ee749cf82ed744cb2 /lowbat.c
parent7fe3ed119341313532b4ea92be60a116ba17eba9 (diff)
downloadlowbat-b16a818cd0918845ea899bb913ce4320a606a510.tar.xz
lowbat-b16a818cd0918845ea899bb913ce4320a606a510.zip
add charging state to stdout when ran
Diffstat (limited to 'lowbat.c')
-rw-r--r--lowbat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lowbat.c b/lowbat.c
index f3855bc..50651a7 100644
--- a/lowbat.c
+++ b/lowbat.c
@@ -148,7 +148,7 @@ int main() {
w_lowbat_crit = w_lowbat = 0; // clear conditions
}
- printf("\r%d%%", capacity);
+ printf("\r%s %d%%", discharging ? "Discharging" : "Charging", capacity);
fflush(stdout);
sleep(PERIOD);
}