tAdd config header file - spoon - dwm status utility (2f30 fork)
 (HTM) git clone git://src.adamsgaard.dk/spoon
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 3e78d4a29a9faf088346e9a20369bcacf480dbfa
 (DIR) parent bd267c89fae5f0adcd154693d9b863ac7ee458d7
 (HTM) Author: lostd <lostd@2f30.org>
       Date:   Tue, 24 May 2016 22:22:48 +0100
       
       Add config header file
       
       Diffstat:
         M Makefile                            |       7 ++++++-
         A config.def.h                        |      11 +++++++++++
         M spoon.c                             |      12 ++----------
       
       3 files changed, 19 insertions(+), 11 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       t@@ -3,12 +3,17 @@ PREFIX = /usr/local
        CPPFLAGS = -I/usr/X11R6/include -I/usr/local/include
        LDFLAGS = -L/usr/X11R6/lib -L/usr/local/lib
        LDLIBS = -lxkbfile -lX11 -lmpdclient
       -DISTFILES = spoon.c Makefile LICENSE
       +DISTFILES = spoon.c config.def.h Makefile LICENSE
        OBJ = spoon.o
        BIN = spoon
        
        all: $(BIN)
        
       +spoon.o: config.h
       +
       +config.h:
       +        cp config.def.h $@
       +
        clean:
                rm -f $(OBJ) $(BIN) $(BIN)-$(VERSION).tar.gz
        
 (DIR) diff --git a/config.def.h b/config.def.h
       t@@ -0,0 +1,11 @@
       +struct ent ents[] = {
       +        /* reorder this if you want */
       +        { .fmt = "[%s] ", .read = mpdread },
       +        { .fmt = "[%s] ", .read = mixread },
       +        { .fmt = "[%s] ", .read = cpuread },
       +        { .fmt = "[%s] ", .read = tempread },
       +        { .fmt = "%s ", .read = battread },
       +        { .fmt = "%s ", .read = wifiread },
       +        { .fmt = "[%s] ", .read = xkblayoutread },
       +        { .fmt = "%s", .read = dateread },
       +};
 (DIR) diff --git a/spoon.c b/spoon.c
       t@@ -27,18 +27,10 @@ int xkblayoutread(char *buf, size_t len);
        struct ent {
                char *fmt;
                int (*read)(char *, size_t);
       -} ents[] = {
       -        /* reorder this if you want */
       -        { .fmt = "[%s] ", .read = mpdread },
       -        { .fmt = "[%s] ", .read = mixread },
       -        { .fmt = "[%s] ", .read = cpuread },
       -        { .fmt = "[%s] ", .read = tempread },
       -        { .fmt = "%s ", .read = battread },
       -        { .fmt = "%s ", .read = wifiread },
       -        { .fmt = "[%s] ", .read = xkblayoutread },
       -        { .fmt = "%s", .read = dateread },
        };
        
       +#include "config.h"
       +
        int
        dummyread(char *buf, size_t len)
        {