From 63d8b7172a13182c42bc66cc0fc395139597c2e6 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Thu, 2 Jul 2020 10:07:39 +0200 Subject: [PATCH] Some config --- config.mk | 2 +- dwmstatus.c | 27 ++++++--------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/config.mk b/config.mk index 0ec9e47..e40d17e 100644 --- a/config.mk +++ b/config.mk @@ -4,7 +4,7 @@ VERSION = 1.0 # Customize below to fit your system # paths -PREFIX = /usr +PREFIX = $(HOME) MANPREFIX = ${PREFIX}/share/man X11INC = /usr/X11R6/include diff --git a/dwmstatus.c b/dwmstatus.c index d2a4b03..936757f 100644 --- a/dwmstatus.c +++ b/dwmstatus.c @@ -180,12 +180,8 @@ main(void) { char *status; char *avgs; - char *bat; - char *bat1; - char *tmar; - char *tmutc; char *tmbln; - char *t0, *t1, *t2; + char *t0, *t1; if (!(dpy = XOpenDisplay(NULL))) { fprintf(stderr, "dwmstatus: cannot open display.\n"); @@ -194,28 +190,17 @@ main(void) for (;;sleep(60)) { avgs = loadavg(); - bat = getbattery("/sys/class/power_supply/BAT0"); - bat1 = getbattery("/sys/class/power_supply/BAT1"); - 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/hwmon0", "temp1_input"); - t1 = gettemperature("/sys/devices/virtual/hwmon/hwmon2", "temp1_input"); - t2 = gettemperature("/sys/devices/virtual/hwmon/hwmon4", "temp1_input"); + 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"); - 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); + status = smprintf("Temp: %s, %s | Load: %s | %s %s", + t0, t1, avgs, tmbln); setstatus(status); free(t0); free(t1); - free(t2); free(avgs); - free(bat); - free(bat1); - free(tmar); - free(tmutc); free(tmbln); free(status); }