commit 718c0afdc4cf1ab8bef9bf997821119e13195300
Author: fartnuget <lorcantodea_AT_gmail.com>
Date: Fri Jun 27 20:17:22 2025 -0400
[dmenu][patch] dmenupadding - port of the dwm statuspadding patch to dmenu
diff --git a/tools.suckless.org/dmenu/patches/dmenupadding/dmenu-dmenupadding-20250627-b1e217b.diff b/tools.suckless.org/dmenu/patches/dmenupadding/dmenu-dmenupadding-20250627-b1e217b.diff
new file mode 100644
index 00000000..6ecb68b1
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/dmenupadding/dmenu-dmenupadding-20250627-b1e217b.diff
_AT_@ -0,0 +1,48 @@
+From 64b8bbdc00a0fea6af5855bd56c7b92589cdfdcd Mon Sep 17 00:00:00 2001
+From: lorcan <lorcantodea_AT_gmail.com>
+Date: Fri, 27 Jun 2025 19:58:45 -0400
+Subject: [PATCH] port of the dwm statuspadding patch for dmenu
+
+---
+ config.def.h | 2 ++
+ dmenu.c | 4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1edb647..a8258e6 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -2,6 +2,8 @@
+ /* Default settings; can be overriden by command line. */
+
+ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
++static int horizpadbar = 2; /* horizontal padding */
++static int vertpadbar = 0; /* vertical padding */
+ /* -fn option overrides fonts[0]; default X11 font or font set */
+ static const char *fonts[] = {
+ "monospace:size=10"
+diff --git a/dmenu.c b/dmenu.c
+index fd49549..6bc6d78 100644
+--- a/dmenu.c
++++ b/dmenu.c
+_AT_@ -633,7 +633,7 @@ setup(void)
+ utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+
+ /* calculate menu geometry */
+- bh = drw->fonts->h + 2;
++ bh = drw->fonts->h + vertpadbar;
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
+ #ifdef XINERAMA
+_AT_@ -774,7 +774,7 @@ main(int argc, char *argv[])
+ drw = drw_create(dpy, screen, root, wa.width, wa.height);
+ if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
+ die("no fonts could be loaded.");
+- lrpad = drw->fonts->h;
++ lrpad = drw->fonts->h + horizpadbar;
+
+ #ifdef __OpenBSD__
+ if (pledge("stdio rpath", NULL) == -1)
+--
+2.50.0
+
diff --git a/tools.suckless.org/dmenu/patches/dmenupadding/index.md b/tools.suckless.org/dmenu/patches/dmenupadding/index.md
new file mode 100644
index 00000000..e4f2aad4
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/dmenupadding/index.md
_AT_@ -0,0 +1,23 @@
+# dmenupadding
+
+## Description
+
+This is a port of the dwm statuspadding patch.
+
+It lets you customize the horizontal and vertical padding in dmenu.
+
+The configurable options in config.def.h are:
+
+horizpadbar
+
+vertpadbar
+
+## Download
+
+- [dmenu-dmenupadding-20250627-b1e217b.diff](dmenu-dmenupadding-20250627-b1e217b.diff)
+
+## Authors
+
+- taep96 - <taep96_AT_cock.li> (statuspadding)
+- cd (statuspadding)
+- [fartnuget](
https://github.com/fartnuget)
Received on Sat Jun 28 2025 - 02:17:38 CEST