From 8d1417b53842b9667f2a6b049cf33dabb47c3f4e Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Tue, 31 Jan 2023 09:11:21 -0500 Subject: Set DMENU_FLAGS in the environment. --- dwm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index ce81b45..f18658b 100644 --- a/dwm.c +++ b/dwm.c @@ -245,6 +245,7 @@ static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); +static void setDmenuFlags(); /* variables */ static const char broken[] = "broken"; @@ -2421,6 +2422,27 @@ zoom(const Arg *arg) pop(c); } +/* Make central configuration of dmenu appearance easy by sucking it out + * of our config.h + */ +void +setDmenuFlags() { + const char *dmenu_flags[] = { DMENU_FLAGS, NULL }; + char *dflags = ecalloc(1024, sizeof(char)); + char *tmp = NULL; + for (int i = 0; i