sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 2e3a81cdafd27f538ec89cb5d2c923628f3a8468
parent 65f350a7c2c7066ac17d50e0620624caa356a6a4
Author: Leon Plickat <leonhenrik.plickat@stud.uni-goettingen.de>
Date:   Sun, 19 May 2019 02:22:17 +0200

dmenu/patches: Add 'border' patch

This patch adds a border around the dmenu window and is intended to make
dmenu stand out from the background when used with either the center or
xwy patch.

Diffstat:
Atools.suckless.org/dmenu/patches/border/dmenu-border-4.9.diff | 25+++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/border/dmenu_border.png | 0
Atools.suckless.org/dmenu/patches/border/index.md | 19+++++++++++++++++++
3 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/dmenu/patches/border/dmenu-border-4.9.diff b/tools.suckless.org/dmenu/patches/border/dmenu-border-4.9.diff @@ -0,0 +1,25 @@ +diff -up dmenu-4.9-b/config.def.h dmenu-4.9-a/config.def.h +--- dmenu-4.9-b/config.def.h 2019-02-02 13:55:02.000000000 +0100 ++++ dmenu-4.9-a/config.def.h 2019-05-19 02:10:12.740040403 +0200 +@@ -21,3 +21,6 @@ static unsigned int lines = 0; + * for example: " /?\"&[]" + */ + static const char worddelimiters[] = " "; ++ ++/* Size of the window border */ ++static const unsigned int border_width = 5; +diff -up dmenu-4.9-b/dmenu.c dmenu-4.9-a/dmenu.c +--- dmenu-4.9-b/dmenu.c 2019-02-02 13:55:02.000000000 +0100 ++++ dmenu-4.9-a/dmenu.c 2019-05-19 02:11:20.966710117 +0200 +@@ -654,9 +654,10 @@ setup(void) + swa.override_redirect = True; + swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; + swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask; +- win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0, ++ win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width, + CopyFromParent, CopyFromParent, CopyFromParent, + CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); ++ XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); + XSetClassHint(dpy, win, &ch); + + /* open input methods */ diff --git a/tools.suckless.org/dmenu/patches/border/dmenu_border.png b/tools.suckless.org/dmenu/patches/border/dmenu_border.png Binary files differ. diff --git a/tools.suckless.org/dmenu/patches/border/index.md b/tools.suckless.org/dmenu/patches/border/index.md @@ -0,0 +1,19 @@ +border +====== + +Description +----------- +This patch adds a border around the dmenu window. It is intended to be used with +the center or xyw patches, to make the menu stand out from similarly coloured +windows. + + +![dmenu border screenshot](dmenu_border.png) + +Download +-------- +* [dmenu-border-4.9.diff](dmenu-border-4.9.diff) (19.05.2019) + +Authors +------- +* Leon Plickat <leonhenrik.plickat[at]stud.uni-goettingen.de>