sites

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

commit 718c0afdc4cf1ab8bef9bf997821119e13195300
parent 048a4394cd86ca09a9503e5631ab9fb1ede3c50d
Author: fartnuget <lorcantodea@gmail.com>
Date:   Fri, 27 Jun 2025 20:17:22 -0400

[dmenu][patch] dmenupadding - port of the dwm statuspadding patch to dmenu

Diffstat:
Atools.suckless.org/dmenu/patches/dmenupadding/dmenu-dmenupadding-20250627-b1e217b.diff | 48++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenupadding/index.md | 23+++++++++++++++++++++++
2 files changed, 71 insertions(+), 0 deletions(-)

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 @@ -0,0 +1,48 @@ +From 64b8bbdc00a0fea6af5855bd56c7b92589cdfdcd Mon Sep 17 00:00:00 2001 +From: lorcan <lorcantodea@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 +@@ -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 +@@ -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 +@@ -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 @@ -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@cock.li> (statuspadding) +- cd (statuspadding) +- [fartnuget](https://github.com/fartnuget)