]> git.sur5r.net Git - i3/i3status/commitdiff
Merge pull request #103 from craftyguy/bat_full_remaining
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Mon, 25 Jan 2016 08:53:59 +0000 (00:53 -0800)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Mon, 25 Jan 2016 08:53:59 +0000 (00:53 -0800)
This removes the 'remaining' time when the battery is full, since theā€¦

src/print_battery_info.c

index 90db4bbebb947ce608012ab3d95f49640d1cd96d..9ce121ef2c709cd7f660633570a0befeefc4ff8f 100644 (file)
@@ -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)