diff options
author | Marcel Hellwig <keks@cookiesoft.de> | 2012-07-08 21:47:42 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-07-09 15:12:43 +0200 |
commit | ccc31f0b803a924b69f23880ea9693e17f57f833 (patch) | |
tree | 9fb8e3e268d26a926b6099d7995cc1320400da5c /src | |
parent | 859a7690a6472ca6d700d29693d986125d11e4b6 (diff) |
Added condition, for red color, when battery-time is low, namely battery is discharging
Diffstat (limited to 'src')
-rw-r--r-- | src/print_battery_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_battery_info.c b/src/print_battery_info.c index f6f238c..3e0c302 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -121,7 +121,7 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char minutes = seconds / 60; seconds -= (minutes * 60); - if (threshold > 0 && seconds_remaining < 60 * threshold) + if (status == CS_DISCHARGING && threshold > 0 && seconds_remaining < 60 * threshold) START_COLOR("color_bad"); (void)snprintf(remainingbuf, sizeof(remainingbuf), "%02d:%02d:%02d", |