spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 3e78d4a29a9faf088346e9a20369bcacf480dbfa
parent bd267c89fae5f0adcd154693d9b863ac7ee458d7
Author: lostd <lostd@2f30.org>
Date:   Tue, 24 May 2016 22:22:48 +0100

Add config header file

Diffstat:
MMakefile | 7++++++-
Aconfig.def.h | 11+++++++++++
Mspoon.c | 12++----------
3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile @@ -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 diff --git a/config.def.h b/config.def.h @@ -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 }, +}; diff --git a/spoon.c b/spoon.c @@ -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) {