dmenu

My dmenu build
git clone https://git.regexghost.com/dmenu.git
Log | Files | Refs | README | LICENSE

commit 357f61f118a1dd9db9621c7d64762d47c0b94875
parent 534b0e4a3c386695dda0f902a292367b4c2a20ca
Author: regexghost <regexghost@protonmail.com>
Date:   Wed, 22 Apr 2026 21:26:40 +0100

border patch

Diffstat:
Mconfig.def.h | 3+++
Mdmenu.c | 6+++++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/config.def.h b/config.def.h @@ -21,3 +21,6 @@ static unsigned int lines = 0; * for example: " /?\"&[]" */ static const char worddelimiters[] = " "; + +/* Size of the window border */ +static unsigned int border_width = 0; diff --git a/dmenu.c b/dmenu.c @@ -684,9 +684,11 @@ setup(void) swa.override_redirect = True; swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask; - win = XCreateWindow(dpy, root, x, y, mw, mh, 0, + win = XCreateWindow(dpy, root, x, y, mw, mh, border_width, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); + if (border_width) + XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); XSetClassHint(dpy, win, &ch); /* input methods */ @@ -761,6 +763,8 @@ main(int argc, char *argv[]) colors[SchemeOut][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();