aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2013-04-17 21:04:05 +0200
committerAnselm R Garbe <anselm@garbe.us>2013-04-17 21:04:05 +0200
commit14f72a276334de4a46543cf648a4922bc54f1e9f (patch)
tree98cc875199829687476b1a05458f811f4805941a
parentec64f273fb7660d3746eb765dc02e40726a54294 (diff)
adopted Alex Sedov's config.h revival patch to tip
-rw-r--r--Makefile6
-rw-r--r--dmenu.c12
2 files changed, 7 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index f011ad7..0f7dfbd 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,11 @@ options:
18 @echo CC -c $< 18 @echo CC -c $<
19 @${CC} -c $< ${CFLAGS} 19 @${CC} -c $< ${CFLAGS}
20 20
21${OBJ}: config.mk draw.h 21config.h:
22 @echo creating $@ from config.def.h
23 @cp config.def.h $@
24
25${OBJ}: config.h config.mk draw.h
22 26
23dmenu: dmenu.o draw.o 27dmenu: dmenu.o draw.o
24 @echo CC -o $@ 28 @echo CC -o $@
diff --git a/dmenu.c b/dmenu.c
index c25dc82..a06ae15 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -44,20 +44,10 @@ static char text[BUFSIZ] = "";
44static int bh, mw, mh; 44static int bh, mw, mh;
45static int inputw, promptw; 45static int inputw, promptw;
46static size_t cursor = 0; 46static size_t cursor = 0;
47static const char *font = NULL;
48static const char *prompt = NULL;
49static const char *normbgcolor = "#222222";
50static const char *normfgcolor = "#bbbbbb";
51static const char *selbgcolor = "#005577";
52static const char *selfgcolor = "#eeeeee";
53static const char *outbgcolor = "#00ffff";
54static const char *outfgcolor = "#000000";
55static unsigned int lines = 0;
56static unsigned long normcol[ColLast]; 47static unsigned long normcol[ColLast];
57static unsigned long selcol[ColLast]; 48static unsigned long selcol[ColLast];
58static unsigned long outcol[ColLast]; 49static unsigned long outcol[ColLast];
59static Atom clip, utf8; 50static Atom clip, utf8;
60static Bool topbar = True;
61static DC *dc; 51static DC *dc;
62static Item *items = NULL; 52static Item *items = NULL;
63static Item *matches, *matchend; 53static Item *matches, *matchend;
@@ -65,6 +55,8 @@ static Item *prev, *curr, *next, *sel;
65static Window win; 55static Window win;
66static XIC xic; 56static XIC xic;
67 57
58#include "config.h"
59
68static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; 60static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
69static char *(*fstrstr)(const char *, const char *) = strstr; 61static char *(*fstrstr)(const char *, const char *) = strstr;
70 62