[wiki] [sites] [dmenu][patch][bar height] add patch to change bar height || tch69

From: <git_AT_suckless.org>
Date: Tue, 07 Feb 2023 16:52:46 +0100

commit b660f7bc18c54133bd3b6578200b107f07c1f7c8
Author: tch69 <ifa26417_AT_outlook.com.vn>
Date: Tue Feb 7 22:49:32 2023 +0700

    [dmenu][patch][bar height] add patch to change bar height

diff --git a/tools.suckless.org/dmenu/patches/bar_height/dmenu-bar-height-5.2.diff b/tools.suckless.org/dmenu/patches/bar_height/dmenu-bar-height-5.2.diff
new file mode 100644
index 00000000..96e90308
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/bar_height/dmenu-bar-height-5.2.diff
_AT_@ -0,0 +1,27 @@
+diff --git a/config.def.h b/config.def.h
+index 1edb647..5c79628 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -3,6 +3,8 @@
+
+ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
+ /* -fn option overrides fonts[0]; default X11 font or font set */
++static const int user_bt = 0; /* add an defined amount of pixels to the bar height */
++
+ static const char *fonts[] = {
+ "monospace:size=10"
+ };
+diff --git a/dmenu.c b/dmenu.c
+index 27b7a30..7be0dc3 100644
+--- a/dmenu.c
++++ b/dmenu.c
+_AT_@ -629,7 +629,8 @@ setup(void)
+ utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+
+ /* calculate menu geometry */
+- bh = drw->fonts->h + 2;
++ bh = drw->fonts->h;
++ bh = user_bh ? bh + user_bh : bh + 2;
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
+ #ifdef XINERAMA
diff --git a/tools.suckless.org/dmenu/patches/bar_height/index.md b/tools.suckless.org/dmenu/patches/bar_height/index.md
new file mode 100644
index 00000000..2a636022
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/bar_height/index.md
_AT_@ -0,0 +1,12 @@
+bar height
+==========
+A port of the [bar height patch for dwm](//dwm.suckless.org/patches/bar_height), allows user to change the dmenu bar height.
+
+Download
+--------
+* [dmenu-bar-height-5.2.diff](dmenu-bar-height-5.2.diff)
+
+Authors
+-------
+* tch69 (fa2_l at outlook dot com): dmenu port
+* bit6tream [bit6tream_AT_cock.li](mailto:bit6tream_AT_cock.li): original dwm patch
Received on Tue Feb 07 2023 - 16:52:46 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 07 2023 - 17:00:54 CET