diff --git a/dmenu/config.def.h b/dmenu/config.def.h index 8ce09c3..fcf051d 100644 --- a/dmenu/config.def.h +++ b/dmenu/config.def.h @@ -16,6 +16,7 @@ static const char *colors[SchemeLast][2] = { [SchemeSelHighlight] = { "#ffc978", "#005577" }, [SchemeNormHighlight] = { "#ffc978", "#222222" }, [SchemeOut] = { "#000000", "#00ffff" }, + [SchemeMid] = { "#eeeeee", "#770000" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ static unsigned int lines = 0; @@ -28,4 +29,4 @@ static unsigned int lineheight = 0; /* -h option; minimum height of a me static const char worddelimiters[] = " "; /* Size of the window border */ -static const unsigned int border_width = 5; +static unsigned int border_width = 0; diff --git a/dmenu/config.h b/dmenu/config.h index 84c60fe..5a82f28 100644 --- a/dmenu/config.h +++ b/dmenu/config.h @@ -3,7 +3,7 @@ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ static int centered = 0; /* -c option; centers dmenu on screen */ -static int min_width = 500; /* minimum width when centered */ +static int min_width = 600; /* minimum width when centered */ /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { "Mononoki Nerd Font:size=10" @@ -16,6 +16,7 @@ static const char *colors[SchemeLast][2] = { [SchemeSelHighlight] = { "#82aaff", "#000000" }, [SchemeNormHighlight] = { "#f1fa8c", "#000000" }, [SchemeOut] = { "#000000", "#00ffff" }, + [SchemeMid] = { "#eeeeee", "#770000" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ static unsigned int lines = 0; @@ -28,4 +29,4 @@ static unsigned int lineheight = 22; /* -h option; minimum height of a m static const char worddelimiters[] = " "; /* Size of the window border */ -static const unsigned int border_width = 0; +static unsigned int border_width = 1; diff --git a/dmenu/dmenu b/dmenu/dmenu index 61c6c2e..f6f095e 100755 Binary files a/dmenu/dmenu and b/dmenu/dmenu differ diff --git a/dmenu/dmenu.c b/dmenu/dmenu.c index 8f544d2..88bbc8b 100644 --- a/dmenu/dmenu.c +++ b/dmenu/dmenu.c @@ -28,7 +28,7 @@ #define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1 /* enums */ -enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeLast }; /* color schemes */ +enum { SchemeNorm, SchemeSel, SchemeOut, SchemeNormHighlight, SchemeSelHighlight, SchemeMid, SchemeLast }; /* color schemes */ struct item { char *text; @@ -166,6 +166,8 @@ drawitem(struct item *item, int x, int y, int w) { if (item == sel) drw_setscheme(drw, scheme[SchemeSel]); + else if (item->left == sel || item->right == sel) + drw_setscheme(drw, scheme[SchemeMid]); else if (item->out) drw_setscheme(drw, scheme[SchemeOut]); else @@ -740,7 +742,8 @@ setup(void) win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); - XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); + if (border_width) + XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); XSetClassHint(dpy, win, &ch); /* open input methods */ @@ -817,6 +820,8 @@ main(int argc, char *argv[]) colors[SchemeSel][ColFg] = argv[++i]; else if (!strcmp(argv[i], "-w")) /* embedding window id */ embed = argv[++i]; + else if (!strcmp(argv[i], "-bw")) + border_width = atoi(argv[++i]); /* border width */ else usage(); diff --git a/dmenu/dmenu.o b/dmenu/dmenu.o index 90ece45..3bda4af 100644 Binary files a/dmenu/dmenu.o and b/dmenu/dmenu.o differ