all repos — tint2 @ fc61676732303ee53a7224ef73177432f01dd277

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Battery: Do not show time remaining if rate is zero
o9000 mrovi9000@gmail.com
commit

fc61676732303ee53a7224ef73177432f01dd277

parent

1772d0a894bf93da8def0d967a8b229c115cffd1

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/battery/battery.csrc/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); }