/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <limits.h>
#include <stdio.h>
#include <string.h>
}
return (i == LEN(map)) ? "?" : map[i].symbol;
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <stdio.h>
#include <string.h>
return bprintf("%d", perc);
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <stdio.h>
#include "../util.h"
return (pscanf("/proc/sys/kernel/random/entropy_avail", "%d", &num) == 1) ?
bprintf("%d", num) : NULL;
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <err.h>
#include <ifaddrs.h>
#include <netdb.h>
return NULL;
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <stdio.h>
#include "../util.h"
bprintf("%f", (float)(total - free - buffers - cached) / 1024 / 1024) :
NULL;
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <err.h>
#include <stdio.h>
#include <string.h>
return bprintf("%f", (float)(total - free - cached) / 1024 / 1024);
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <stdio.h>
#include "../util.h"
return (pscanf(file, "%d", &temp) == 1) ?
bprintf("%d", temp / 1000) : NULL;
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <sys/sysinfo.h>
#include "../util.h"
return bprintf("%dh %dm", h, m);
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <err.h>
#include <fcntl.h>
#include <sys/soundcard.h>
return bprintf("%d", v & 0xff);
}
+#endif
/* See LICENSE file for copyright and license details. */
+#ifdef __linux__
#include <err.h>
#include <ifaddrs.h>
#include <linux/wireless.h>
else
return id;
}
+#endif