* dwmstatus for OpenBSD
       
   URI git clone git://git.codevoid.de/dwmstatus-sdk
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
   DIR commit ed8774c79ae4551cc1c33deb2c4a053756a0ecb8
   DIR parent cdf268a37a311e5f22b7b2570beb2e3ad5761d03
   URI Author: Stefan Hagen <sh+git[at]codevoid[dot]de>
       Date:   Sun,  3 Jun 2018 13:10:23 +0200
       
       Remove redundant smprintf + low disk space warning
       
       Diffstat:
         M dwmstatus.c                         |      13 ++++++++-----
       
       1 file changed, 8 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/dwmstatus.c b/dwmstatus.c
       @@ -27,10 +27,9 @@
        #include <sys/param.h>
        #include <sys/mount.h>
        
       -
       -
        // configuration
        #define UPDATE_INTERVAL 10
       +#define LOW_DISKSPACE 10240
        
        // conversation presets
        #define ZEROCTOC(x) ((x)-2731) / 10
       @@ -273,19 +272,23 @@ void update() {
            battery  = smprintf("%i", getsysctl("hw.acpi.battery.life"));
        
            // audio volume
       -    volume = smprintf("%s", getvolume("/dev/mixer"));
       +    volume = getvolume("/dev/mixer");
        
            // IP + (lan speed / wlan ssid)
            // TBD
        
            // free disk space (root/home)
       -    freespace = smprintf("%s", getfreespace("/"));
       +    freespace = getfreespace("/");
        
            // date and time
            datetime = mktimes("%d.%m.%Y %H:%M", tzberlin);
        
            // assemble and display
       -    status   = smprintf("/:%sMB LOAD:%s TEMP:%s°C FREQ:%sMhz BAT:%s%% VOL:%s | %s ", freespace, loadavg(), cputemp, cpufreq, battery, volume, datetime);
       +    if(atoi(freespace) > LOW_DISKSPACE) {
       +        status   = smprintf("/:%sMB LOAD:%s TEMP:%s°C FREQ:%sMhz BAT:%s%% VOL:%s | %s ", freespace, loadavg(), cputemp, cpufreq, battery, volume, datetime);
       +    } else {
       +        status   = smprintf("!!! LOW DISK SPACE WARNING !!! /:%sMB LOAD:%s TEMP:%s°C FREQ:%sMhz BAT:%s%% VOL:%s | %s ", freespace, loadavg(), cputemp, cpufreq, battery, volume, datetime);
       +    }
            setstatus(status);
        
            free(freespace);