Temperature control
fix sensors add third sensor
This commit is contained in:
parent
90517af01b
commit
211f12c0c1
11
dwmstatus.c
11
dwmstatus.c
@ -181,7 +181,7 @@ main(void)
|
|||||||
char *status;
|
char *status;
|
||||||
char *avgs;
|
char *avgs;
|
||||||
char *tmbln;
|
char *tmbln;
|
||||||
char *t0, *t1;
|
char *t0, *t1, *t2;
|
||||||
char *bat;
|
char *bat;
|
||||||
|
|
||||||
if (!(dpy = XOpenDisplay(NULL))) {
|
if (!(dpy = XOpenDisplay(NULL))) {
|
||||||
@ -192,12 +192,13 @@ main(void)
|
|||||||
for (;;sleep(60)) {
|
for (;;sleep(60)) {
|
||||||
avgs = loadavg();
|
avgs = loadavg();
|
||||||
tmbln = mktimes("%a %d %b %H:%M %Z %Y", tzberlin);
|
tmbln = mktimes("%a %d %b %H:%M %Z %Y", tzberlin);
|
||||||
t0 = gettemperature("/sys/class//hwmon/hwmon0", "temp1_input");
|
t0 = gettemperature("/sys/class//hwmon/hwmon1", "temp1_input");
|
||||||
t1 = gettemperature("/sys/class//hwmon/hwmon2", "temp1_input");
|
t1 = gettemperature("/sys/class//hwmon/hwmon3", "temp1_input");
|
||||||
|
t2 = gettemperature("/sys/class//hwmon/hwmon6", "temp1_input");
|
||||||
bat = getbattery("/sys/class/power_supply/BAT0");
|
bat = getbattery("/sys/class/power_supply/BAT0");
|
||||||
|
|
||||||
status = smprintf("Bat: %s | Temp: %s, %s | Load: %s | %s",
|
status = smprintf("Bat: %s | Temp: %s, %s, %s | Load: %s | %s",
|
||||||
bat, t0, t1, avgs, tmbln);
|
bat, t0, t1, t2, avgs, tmbln);
|
||||||
setstatus(status);
|
setstatus(status);
|
||||||
|
|
||||||
free(t0);
|
free(t0);
|
||||||
|
Loading…
Reference in New Issue
Block a user