const char *args;
};
-void setstatus(const char *);
-char *smprintf(const char *, ...);
-char *battery_perc(const char *);
-char *cpu_perc(const char *);
-char *datetime(const char *);
-char *disk_free(const char *);
-char *disk_perc(const char *);
-char *disk_total(const char *);
-char *disk_used(const char *);
-char *entropy(const char *);
-char *gid(const char *);
-char *hostname(const char *);
-char *ip(const char *);
-char *load_avg(const char *);
-char *ram_free(const char *);
-char *ram_perc(const char *);
-char *ram_used(const char *);
-char *ram_total(const char *);
-char *run_command(const char *);
-char *temp(const char *);
-char *uid(const char *);
-char *uptime(const char *);
-char *username(const char *);
-char *vol_perc(const char *);
-char *wifi_perc(const char *);
-char *wifi_essid(const char *);
+static void setstatus(const char *);
+static char *smprintf(const char *, ...);
+static char *battery_perc(const char *);
+static char *cpu_perc(const char *);
+static char *datetime(const char *);
+static char *disk_free(const char *);
+static char *disk_perc(const char *);
+static char *disk_total(const char *);
+static char *disk_used(const char *);
+static char *entropy(const char *);
+static char *gid(const char *);
+static char *hostname(const char *);
+static char *ip(const char *);
+static char *load_avg(const char *);
+static char *ram_free(const char *);
+static char *ram_perc(const char *);
+static char *ram_used(const char *);
+static char *ram_total(const char *);
+static char *run_command(const char *);
+static char *temp(const char *);
+static char *uid(const char *);
+static char *uptime(const char *);
+static char *username(const char *);
+static char *vol_perc(const char *);
+static char *wifi_perc(const char *);
+static char *wifi_essid(const char *);
static Display *dpy;
#include "config.h"
-void
+static void
setstatus(const char *str)
{
/* set WM_NAME via X11 */
XSync(dpy, False);
}
-char *
+static char *
smprintf(const char *fmt, ...)
{
va_list fmtargs;
return ret;
}
-char *
+static char *
battery_perc(const char *battery)
{
int now, full, perc;
return smprintf("%d%%", perc);
}
-char *
+static char *
cpu_perc(const char *null)
{
int perc;
return smprintf("%d%%", perc);
}
-char *
+static char *
datetime(const char *timeformat)
{
time_t tm;
return ret;
}
-char *
+static char *
disk_free(const char *mountpoint)
{
struct statvfs fs;
return smprintf("%f", (float)fs.f_bsize * (float)fs.f_bfree / 1024 / 1024 / 1024);
}
-char *
+static char *
disk_perc(const char *mountpoint)
{
int perc = 0;
return smprintf("%d%%", perc);
}
-char *
+static char *
disk_total(const char *mountpoint)
{
struct statvfs fs;
return smprintf("%f", (float)fs.f_bsize * (float)fs.f_blocks / 1024 / 1024 / 1024);
}
-char *
+static char *
disk_used(const char *mountpoint)
{
struct statvfs fs;
return smprintf("%f", (float)fs.f_bsize * ((float)fs.f_blocks - (float)fs.f_bfree) / 1024 / 1024 / 1024);
}
-char *
+static char *
entropy(const char *null)
{
int entropy = 0;
return smprintf("%d", entropy);
}
-char *
+static char *
gid(const char *null)
{
gid_t gid;
return smprintf(unknowntext);
}
-char *
+static char *
hostname(const char *null)
{
char hostname[HOST_NAME_MAX];
return smprintf("%s", hostname);
}
-char *
+static char *
ip(const char *interface)
{
struct ifaddrs *ifaddr, *ifa;
return smprintf(unknowntext);
}
-char *
+static char *
load_avg(const char *null)
{
double avgs[3];
return smprintf("%.2f %.2f %.2f", avgs[0], avgs[1], avgs[2]);
}
-char *
+static char *
ram_free(const char *null)
{
long free;
return smprintf("%f", (float)free / 1024 / 1024);
}
-char *
+static char *
ram_perc(const char *null)
{
int perc;
return smprintf("%d%%", perc);
}
-char *
+static char *
ram_total(const char *null)
{
long total;
return smprintf("%f", (float)total / 1024 / 1024);
}
-char *
+static char *
ram_used(const char *null)
{
long free, total, buffers, cached, used;
return smprintf("%f", (float)used / 1024 / 1024);
}
-char *
+static char *
run_command(const char* command)
{
int good;
return smprintf("%s", buffer);
}
-char *
+static char *
temp(const char *file)
{
int temperature;
return smprintf("%d°C", temperature / 1000);
}
-char *
+static char *
uptime(const char *null)
{
struct sysinfo info;
return smprintf("%dh %dm", hours, minutes);
}
-char *
+static char *
username(const char *null)
{
register struct passwd *pw;
return smprintf(unknowntext);
}
-char *
+static char *
uid(const char *null)
{
register uid_t uid;
}
-char *
+static char *
vol_perc(const char *soundcard)
{
int mute = 0;
return smprintf("%d%%", (vol * 100) / max);
}
-char *
+static char *
wifi_perc(const char *wificard)
{
int bufsize = 255;
return smprintf("%d%%", strength);
}
-char *
+static char *
wifi_essid(const char *wificard)
{
char id[IW_ESSID_MAX_SIZE+1];