diff options
| author | 2014-10-21 11:15:27 +0100 | |
|---|---|---|
| committer | 2014-10-21 11:15:27 +0100 | |
| commit | 43fa667cd62e7736fc99afb2dd56b81b1acc9693 (patch) | |
| tree | 1149daf86e4d2af5d4c5ac2f2c6d1f7fa91a8dd9 | |
| parent | a9b5370ac67c586771472f4d2763a971cc519c5c (diff) | |
| download | nnn-43fa667cd62e7736fc99afb2dd56b81b1acc9693.tar.gz | |
Add config.def.h
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | config.def.h | 9 | ||||
| -rw-r--r-- | noice.c | 10 |
3 files changed, 16 insertions, 11 deletions
@@ -6,10 +6,14 @@ BIN = noice all: $(BIN) -$(BIN): $(OBJ) +$(BIN): config.h $(OBJ) $(CC) -o $@ $(OBJ) $(LDLIBS) -noice.o: noice.c queue.h util.h +config.h: + @echo copying config.def.h to $@ + @cp config.def.h $@ + +noice.o: noice.c util.h $(CC) -c noice.c strlcpy.o: strlcpy.c util.h diff --git a/config.def.h b/config.def.h new file mode 100644 index 0000000..cebb942 --- /dev/null +++ b/config.def.h @@ -0,0 +1,9 @@ +/* Configuration */ +struct assoc assocs[] = { + { "\\.(avi|mp4|mkv|mp3|ogg)$", "mplayer" }, + { "\\.(png|jpg|gif)$", "feh" }, + { "\\.(html|svg)$", "firefox" }, + { "\\.pdf$", "mupdf" }, + { "\\.sh$", "sh" }, + { ".*", "less" }, +}; @@ -43,15 +43,7 @@ struct assoc { char *bin; /* Program */ }; -/* Configuration */ -struct assoc assocs[] = { - { "\\.(avi|mp4|mkv|mp3|ogg)$", "mplayer" }, - { "\\.(png|jpg|gif)$", "feh" }, - { "\\.(html|svg)$", "firefox" }, - { "\\.pdf$", "mupdf" }, - { "\\.sh$", "sh" }, - { ".*", "less" }, -}; +#include "config.h" struct entry { char *name; |