Add free memory
This commit is contained in:
parent
46f35713b6
commit
0a69e941d5
|
@ -218,6 +218,7 @@ main(void)
|
|||
int t1;
|
||||
char *kbmap;
|
||||
char *surfs;
|
||||
char *freeMem;
|
||||
|
||||
if (!(dpy = XOpenDisplay(NULL))) {
|
||||
fprintf(stderr, "dwmstatus: cannot open display.\n");
|
||||
|
@ -234,8 +235,9 @@ main(void)
|
|||
// surfs = execscript("surf-status");
|
||||
t0 = gettemperature("/sys/devices/virtual/thermal/thermal_zone0", "temp");
|
||||
t1 = gettemperature("/sys/devices/virtual/thermal/thermal_zone1", "temp");
|
||||
freeMem = execscript("free -m | grep Mem | awk '{ print $3 }'");
|
||||
|
||||
status = smprintf("| T%d°C | L%s | B%s | %s |", t0 > t1 ? t0 : t1, avgs, bat, tmbln);
|
||||
status = smprintf("| T%d°C | L%s | %sM | B%s | %s |", t0 > t1 ? t0 : t1, avgs, freeMem, bat, tmbln);
|
||||
setstatus(status);
|
||||
|
||||
// free(surfs);
|
||||
|
@ -248,6 +250,7 @@ main(void)
|
|||
// free(tmutc);
|
||||
free(tmbln);
|
||||
free(status);
|
||||
free(freeMem);
|
||||
}
|
||||
|
||||
XCloseDisplay(dpy);
|
||||
|
|
Loading…
Reference in New Issue