summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2018-07-17 15:49:45 +0200
committerChristoph Lohmann <20h@r-36.net>2018-07-17 15:49:45 +0200
commit7bde3c55521fa3d7c7029ad99ec7e88e8c9f301c (patch)
tree76f7b45a048020ad1c53b96aa8cbd0ea54d622a4
parente0bea395b27a50936a4db59ecb34775067eab4f3 (diff)
Adapt dwmstatus to 2018.
-rw-r--r--dwmstatus.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/dwmstatus.c b/dwmstatus.c
index 9790212..d2a4b03 100644
--- a/dwmstatus.c
+++ b/dwmstatus.c
@@ -185,7 +185,7 @@ main(void)
char *tmar;
char *tmutc;
char *tmbln;
- char *t0, *t1, *t2, *t3;
+ char *t0, *t1, *t2;
if (!(dpy = XOpenDisplay(NULL))) {
fprintf(stderr, "dwmstatus: cannot open display.\n");
@@ -199,20 +199,18 @@ main(void)
tmar = mktimes("%H:%M", tzargentina);
tmutc = mktimes("%H:%M", tzutc);
tmbln = mktimes("KW %W %a %d %b %H:%M %Z %Y", tzberlin);
- t0 = gettemperature("/sys/devices/virtual/hwmon/hwmon1", "temp1_input");
- t1 = gettemperature("/sys/devices/platform/coretemp.0/hwmon/hwmon3", "temp1_input");
- t2 = gettemperature("/sys/devices/platform/coretemp.0/hwmon/hwmon3", "temp2_input");
- t3 = gettemperature("/sys/devices/platform/coretemp.0/hwmon/hwmon3", "temp3_input");
+ t0 = gettemperature("/sys/devices/virtual/hwmon/hwmon0", "temp1_input");
+ t1 = gettemperature("/sys/devices/virtual/hwmon/hwmon2", "temp1_input");
+ t2 = gettemperature("/sys/devices/virtual/hwmon/hwmon4", "temp1_input");
- status = smprintf("T:%s|%s|%s|%s L:%s B:%s|%s A:%s U:%s %s",
- t0, t1, t2, t3, avgs, bat, bat1, tmar, tmutc,
+ status = smprintf("T:%s|%s|%s L:%s B:%s|%s A:%s U:%s %s",
+ t0, t1, t2, avgs, bat, bat1, tmar, tmutc,
tmbln);
setstatus(status);
free(t0);
free(t1);
free(t2);
- free(t3);
free(avgs);
free(bat);
free(bat1);