diff -r 163e96e2b941 -r e08bdbec1843 status-bat/bat.c --- a/status-bat/bat.c Mon Oct 17 14:23:58 2016 +0400 +++ b/status-bat/bat.c Sat Aug 17 15:23:15 2019 +0400 @@ -135,24 +135,25 @@ char *status = catfile(filename); int remtime = 0; - char *arrow; + char *arrow = "—"; - remtimes_color = color_none; + arrow_color = color_none; + remtimes_color = color_green; + if (!strcmp(status,"Charging")) { - if (current_now != 0) + if (current_now != 0) { remtime = (charge_full-charge_now) / (current_now/60); - arrow = "↑"; - arrow_color = color_orange; + arrow = "↑"; + arrow_color = color_orange; + } } else if (!strcmp(status,"Discharging")) { - if (current_now != 0) + if (current_now != 0) { remtime = charge_now / (current_now/60); - arrow = down_arrow; - arrow_color = color_none; - remtimes_color = color(20,120,0,remtime); - } else { - arrow = "—"; - arrow_color = color_green; + arrow = down_arrow; + arrow_color = color_none; + remtimes_color = color(20,120,0,remtime); + } } free(status);