Some config
This commit is contained in:
parent
51bc02f6ea
commit
63d8b7172a
@ -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
|
||||
|
27
dwmstatus.c
27
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user