diff --git a/dwmstatus.c b/dwmstatus.c index 936757f..e5e9142 100644 --- a/dwmstatus.c +++ b/dwmstatus.c @@ -182,6 +182,7 @@ main(void) char *avgs; char *tmbln; char *t0, *t1; + char *bat; if (!(dpy = XOpenDisplay(NULL))) { fprintf(stderr, "dwmstatus: cannot open display.\n"); @@ -193,13 +194,15 @@ main(void) tmbln = mktimes("%a %d %b %H:%M %Z %Y", tzberlin); t0 = gettemperature("/sys/class//hwmon/hwmon0", "temp1_input"); t1 = gettemperature("/sys/class//hwmon/hwmon2", "temp1_input"); + bat = getbattery("/sys/class/power_supply/BAT0"); - status = smprintf("Temp: %s, %s | Load: %s | %s %s", - t0, t1, avgs, tmbln); + status = smprintf("Bat: %s | Temp: %s, %s | Load: %s | %s %s", + bat, t0, t1, avgs, tmbln); setstatus(status); free(t0); free(t1); + free(bat); free(avgs); free(tmbln); free(status);