aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lowbat.12
-rw-r--r--lowbat.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lowbat.1 b/lowbat.1
index 635e596..722960e 100644
--- a/lowbat.1
+++ b/lowbat.1
@@ -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
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);
}