Browse Source

adopted Alex Sedov's config.h revival patch to tip

master
Anselm R Garbe 11 years ago
parent
commit
14f72a2763
2 changed files with 7 additions and 11 deletions
  1. +5
    -1
      Makefile
  2. +2
    -10
      dmenu.c

+ 5
- 1
Makefile View File

@ -18,7 +18,11 @@ options:
@echo CC -c $< @echo CC -c $<
@${CC} -c $< ${CFLAGS} @${CC} -c $< ${CFLAGS}
${OBJ}: config.mk draw.h
config.h:
@echo creating $@ from config.def.h
@cp config.def.h $@
${OBJ}: config.h config.mk draw.h
dmenu: dmenu.o draw.o dmenu: dmenu.o draw.o
@echo CC -o $@ @echo CC -o $@


+ 2
- 10
dmenu.c View File

@ -44,20 +44,10 @@ static char text[BUFSIZ] = "";
static int bh, mw, mh; static int bh, mw, mh;
static int inputw, promptw; static int inputw, promptw;
static size_t cursor = 0; static size_t cursor = 0;
static const char *font = NULL;
static const char *prompt = NULL;
static const char *normbgcolor = "#222222";
static const char *normfgcolor = "#bbbbbb";
static const char *selbgcolor = "#005577";
static const char *selfgcolor = "#eeeeee";
static const char *outbgcolor = "#00ffff";
static const char *outfgcolor = "#000000";
static unsigned int lines = 0;
static unsigned long normcol[ColLast]; static unsigned long normcol[ColLast];
static unsigned long selcol[ColLast]; static unsigned long selcol[ColLast];
static unsigned long outcol[ColLast]; static unsigned long outcol[ColLast];
static Atom clip, utf8; static Atom clip, utf8;
static Bool topbar = True;
static DC *dc; static DC *dc;
static Item *items = NULL; static Item *items = NULL;
static Item *matches, *matchend; static Item *matches, *matchend;
@ -65,6 +55,8 @@ static Item *prev, *curr, *next, *sel;
static Window win; static Window win;
static XIC xic; static XIC xic;
#include "config.h"
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
static char *(*fstrstr)(const char *, const char *) = strstr; static char *(*fstrstr)(const char *, const char *) = strstr;


Loading…
Cancel
Save