X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=dmenu.c;h=5e0a19c806dba9d50ca491fc2a5933e1c8a2d5f1;hb=597d4b43379433a5bf86d490f747c0eeda38bba8;hp=c25dc82373f623757393c593eff6bf6292a76151;hpb=ec64f273fb7660d3746eb765dc02e40726a54294;p=dmenu.git diff --git a/dmenu.c b/dmenu.c index c25dc82..5e0a19c 100644 --- a/dmenu.c +++ b/dmenu.c @@ -44,20 +44,10 @@ static char text[BUFSIZ] = ""; static int bh, mw, mh; static int inputw, promptw; 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 selcol[ColLast]; static unsigned long outcol[ColLast]; static Atom clip, utf8; -static Bool topbar = True; static DC *dc; static Item *items = NULL; static Item *matches, *matchend; @@ -65,6 +55,8 @@ static Item *prev, *curr, *next, *sel; static Window win; static XIC xic; +#include "config.h" + static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; static char *(*fstrstr)(const char *, const char *) = strstr; @@ -287,6 +279,8 @@ keypress(XKeyEvent *ev) { case XK_Return: case XK_KP_Enter: break; + case XK_bracketleft: + exit(EXIT_FAILURE); default: return; }