[wiki] [sites] dmenu/patches: Add 'border' patch || Leon Plickat

From: <git_AT_suckless.org>
Date: Sun, 19 May 2019 02:24:01 +0200

commit 2e3a81cdafd27f538ec89cb5d2c923628f3a8468
Author: Leon Plickat <leonhenrik.plickat_AT_stud.uni-goettingen.de>
Date: Sun May 19 02:22:17 2019 +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.

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
new file mode 100644
index 00000000..89b44376
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/border/dmenu-border-4.9.diff
_AT_@ -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
+_AT_@ -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
+_AT_@ -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
new file mode 100644
index 00000000..6125e320
Binary files /dev/null and b/tools.suckless.org/dmenu/patches/border/dmenu_border.png differ
diff --git a/tools.suckless.org/dmenu/patches/border/index.md b/tools.suckless.org/dmenu/patches/border/index.md
new file mode 100644
index 00000000..656ba4fc
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/border/index.md
_AT_@ -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>
Received on Sun May 19 2019 - 02:24:01 CEST

This archive was generated by hypermail 2.3.0 : Sun May 19 2019 - 02:24:38 CEST