Some config

This commit is contained in:
pgrondek 2020-07-02 10:07:39 +02:00
parent 51bc02f6ea
commit 63d8b7172a
2 changed files with 7 additions and 22 deletions

View File

@ -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

View File

@ -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);
}