diff options
author | Clayton Craft <craftyguy@gmail.com> | 2016-01-24 22:39:53 -0800 |
---|---|---|
committer | Clayton Craft <craftyguy@gmail.com> | 2016-01-25 00:38:13 -0800 |
commit | 430b053326d2fe8e6c2b567cfa34b7e468d85e18 (patch) | |
tree | 6ce41dd66aa0f10dd9784a0cd8f60f9a8de4226c /src/print_battery_info.c | |
parent | cc55b44f8074e02bb8e0cc0cd5764c579011a9fc (diff) |
This removes the 'remaining' time when the battery is full, since the remaining time is always 00:00:00. When the battery is discharging, the remaining time will show up again if the user has set their format correctly.
Diffstat (limited to 'src/print_battery_info.c')
-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 90db4bb..9ce121e 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -152,7 +152,7 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char (void)snprintf(percentagebuf, sizeof(percentagebuf), "%.02f%s", percentage_remaining, pct_mark); } - if (present_rate > 0) { + if (present_rate > 0 && status != CS_FULL) { float remaining_time; int seconds, hours, minutes, seconds_remaining; if (status == CS_CHARGING) |