Return to repo list

suckless-gf-dmenu

Gentoo-friendly patches for Suckless's dmenu.
Return to HMagellan.com

commit 574ea6cb23c757212994ead204246e679e2a76c6
parent de43eaa76fffd1a848d1dcace36f9dcc910cf3a1
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Sat, 15 Aug 2020 14:39:47 -0500

Added border

Diffstat:
Apatches/border/USAGE | 27+++++++++++++++++++++++++++
Apatches/border/border.patch | 15+++++++++++++++
2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/patches/border/USAGE b/patches/border/USAGE @@ -0,0 +1,27 @@ +border - Add a border around dmenu +Source: https://st.suckless.org/patches/anysize/st-anysize-0.8.1.diff +Original Author: Leon Plickat <leonhenrik.plickat[at]stud.uni-goettingen.de> + +Description from source: + """ + 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. + """ + +== YOU MUST == +(1). Place the patch file in /etc/portage/patches/x11-misc/dmenu/ +(2). Add the following line to your savedconfig file: + + static const unsigned int border_width = 5; + + Set the 'border_width' variable to the desired border thickness. +(3). Run 'emerge dmenu' + +== YOU PROBABLY SHOULD == +No further action is required. + +== PATCH MODIFICATIONS == +(1). Removed lines relating to config.def.h + +== INCOMPATIBILITIES == +No known specific incompatibilities. diff --git a/patches/border/border.patch b/patches/border/border.patch @@ -0,0 +1,15 @@ +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 */