From f4698205314321253a6798b99dce0849d58d0cd3 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 17 May 2021 11:39:39 +0200 Subject: [PATCH] Adding plain prompt (listfullwidth) patch --- README.md | 6 +++++- dmenu.c | 2 ++ patches.def.h | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1841050..5593af3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ dmenu, how to install it and how it works. ### Changelog: -2021-05-17 - Added the restrict return and no sort patches +2021-05-17 - Added the restrict return, no sort and plain-prompt (listfullwidth) patches 2021-05-15 - Added the tsv and printindex patches @@ -166,6 +166,10 @@ dmenu, how to install it and how it works. - this patch allows the selected text to be piped back out with dmenu - this can be useful if you want to display the output of a command on the screen + - [plain-prompt](https://tools.suckless.org/dmenu/patches/listfullwidth/) + - simple change that avoids colors for the prompt by making it use the same style as the + rest of the input field + - [prefix-completion](https://tools.suckless.org/dmenu/patches/prefix-completion/) - changes the behaviour of matched items and the Tab key to allow tab completion diff --git a/dmenu.c b/dmenu.c index c64e250..6044ae0 100644 --- a/dmenu.c +++ b/dmenu.c @@ -340,7 +340,9 @@ drawmenu(void) drw_rect(drw, 0, 0, mw, mh, 1, 1); if (prompt && *prompt) { + #if !PLAIN_PROMPT_PATCH drw_setscheme(drw, scheme[SchemeSel]); + #endif // PLAIN_PROMPT_PATCH #if PANGO_PATCH x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0, True); #else diff --git a/patches.def.h b/patches.def.h index debb2b4..b4abfb2 100644 --- a/patches.def.h +++ b/patches.def.h @@ -206,6 +206,13 @@ */ #define PIPEOUT_PATCH 0 +/* Lifted from the listfullwidth patch this simple change just avoids colors for the prompt (with + * the -p option or in config.h) by making it use the same style as the rest of the input field. + * The rest of the listfullwidth patch is covered by the vertfull patch. + * https://tools.suckless.org/dmenu/patches/listfullwidth/ + */ +#define PLAIN_PROMPT_PATCH 0 + /* This patch changes the behaviour of matched items and the Tab key to allow tab completion. * https://tools.suckless.org/dmenu/patches/prefix-completion/ */