diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2024-09-12 14:01:09 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2024-09-12 14:01:09 -0500 |
commit | b16a818cd0918845ea899bb913ce4320a606a510 (patch) | |
tree | e1256eb47e2270e49138949ee749cf82ed744cb2 | |
parent | 7fe3ed119341313532b4ea92be60a116ba17eba9 (diff) | |
download | lowbat-b16a818cd0918845ea899bb913ce4320a606a510.tar.xz lowbat-b16a818cd0918845ea899bb913ce4320a606a510.zip |
add charging state to stdout when ran
-rw-r--r-- | lowbat.1 | 2 | ||||
-rw-r--r-- | lowbat.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -11,7 +11,7 @@ The daemon will send a warning notification the user when their battery level drops below 20% while the batteries are discharging, and another critical warning at 5%. .P -The current battery level will also be displayed in stdout. +The current battery level and charging state will also be displayed in stdout. .SH USAGE Call the lowbat executable in your .B @@ -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); } |