dmenu

git clone git://mattcarlson.org/repos/dmenu.git
Log | Files | Refs

commit cce343b532ff8edf1be6a1b71251be3ad25c86ed
parent 2586ec31a4b0b4503f758977b5ab48d24253ce56
Author: Matthew Carlson <matt@mcarlson.xyz>
Date:   Thu,  1 Jul 2021 21:56:49 +0000

Merge branch 'lfw' into dmenu

Diffstat:
Mconfig.h | 1+
Mdmenu.c | 3++-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/config.h b/config.h @@ -4,6 +4,7 @@ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ static int centered = 0; /* -c option; centers dmenu on screen */ static int min_width = 500; /* minimum width when centered */ +static int colorprompt = 1; /* -fn option overrides fonts[0]; default X11 font or font set */ static char font[] = "monospace:size=10"; diff --git a/dmenu.c b/dmenu.c @@ -181,6 +181,7 @@ drawmenu(void) drw_rect(drw, 0, 0, mw, mh, 1, 1); if (prompt && *prompt) { + if (colorprompt) drw_setscheme(drw, scheme[SchemeSel]); x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0); } @@ -203,7 +204,7 @@ drawmenu(void) if (lines > 0) { /* draw vertical list */ for (item = curr; item != next; item = item->right) - drawitem(item, x, y += bh, mw - x); + drawitem(item, 0, y += bh, mw - x); } else if (matches) { /* draw horizontal list */ x += inputw;