Battery: Do not show time remaining if rate is zero
o9000 mrovi9000@gmail.com
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/battery/battery.c
→
src/battery/battery.c
@@ -197,7 +197,7 @@ case 't':
if (battery_state.state == BATTERY_FULL) { snprintf(buf, sizeof(buf), "Full"); strnappend(dest, buf, BATTERY_BUF_SIZE); - } else { + } else if (battery_state.time.hours > 0 && battery_state.time.minutes > 0) { snprintf(buf, sizeof(buf), "%02d:%02d", battery_state.time.hours, battery_state.time.minutes); strnappend(dest, buf, BATTERY_BUF_SIZE); }