Adapt dwmstatus to 2018.

This commit is contained in:
Christoph Lohmann 2018-07-17 15:49:45 +02:00
parent e0bea395b2
commit 7bde3c5552
1 changed files with 6 additions and 8 deletions

View File

@ -185,7 +185,7 @@ main(void)
char *tmar; char *tmar;
char *tmutc; char *tmutc;
char *tmbln; char *tmbln;
char *t0, *t1, *t2, *t3; char *t0, *t1, *t2;
if (!(dpy = XOpenDisplay(NULL))) { if (!(dpy = XOpenDisplay(NULL))) {
fprintf(stderr, "dwmstatus: cannot open display.\n"); fprintf(stderr, "dwmstatus: cannot open display.\n");
@ -199,20 +199,18 @@ main(void)
tmar = mktimes("%H:%M", tzargentina); tmar = mktimes("%H:%M", tzargentina);
tmutc = mktimes("%H:%M", tzutc); tmutc = mktimes("%H:%M", tzutc);
tmbln = mktimes("KW %W %a %d %b %H:%M %Z %Y", tzberlin); tmbln = mktimes("KW %W %a %d %b %H:%M %Z %Y", tzberlin);
t0 = gettemperature("/sys/devices/virtual/hwmon/hwmon1", "temp1_input"); t0 = gettemperature("/sys/devices/virtual/hwmon/hwmon0", "temp1_input");
t1 = gettemperature("/sys/devices/platform/coretemp.0/hwmon/hwmon3", "temp1_input"); t1 = gettemperature("/sys/devices/virtual/hwmon/hwmon2", "temp1_input");
t2 = gettemperature("/sys/devices/platform/coretemp.0/hwmon/hwmon3", "temp2_input"); t2 = gettemperature("/sys/devices/virtual/hwmon/hwmon4", "temp1_input");
t3 = gettemperature("/sys/devices/platform/coretemp.0/hwmon/hwmon3", "temp3_input");
status = smprintf("T:%s|%s|%s|%s L:%s B:%s|%s A:%s U:%s %s", status = smprintf("T:%s|%s|%s L:%s B:%s|%s A:%s U:%s %s",
t0, t1, t2, t3, avgs, bat, bat1, tmar, tmutc, t0, t1, t2, avgs, bat, bat1, tmar, tmutc,
tmbln); tmbln);
setstatus(status); setstatus(status);
free(t0); free(t0);
free(t1); free(t1);
free(t2); free(t2);
free(t3);
free(avgs); free(avgs);
free(bat); free(bat);
free(bat1); free(bat1);