--- 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);
--- a/status-bat/config.def.h Mon Oct 17 14:23:58 2016 +0400
+++ b/status-bat/config.def.h Sat Aug 17 15:23:15 2019 +0400
@@ -3,4 +3,5 @@
/* Uncomment this if you want status-bat to drain the fuck out of your already
dying battery by flashing remaining time indicator */
//#define DRAIN_THE_FUCK
+
//#define PANGO_MARKUP // use second argument instead