From: Clayton Craft Date: Mon, 25 Jan 2016 06:39:53 +0000 (-0800) Subject: This removes the 'remaining' time when the battery is full, since the remaining time... X-Git-Tag: 2.11~43^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F103%2Fhead;p=i3%2Fi3status 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. --- 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)