sites

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

commit d991895444ead75929062ac7a4d835b88c16e246
parent a81f0fe1b3e1691eda0da84748677c830f0ee9b4
Author: amarakon <amar.al-zubaidi45@tutanota.com>
Date:   Tue, 18 Oct 2022 00:47:11 -0400

[dmenu][patch][colored-caret] initial commit

Diffstat:
Atools.suckless.org/dmenu/patches/colored-caret/dmenu-colored-caret-5.2.diff | 38++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/colored-caret/index.md | 19+++++++++++++++++++
2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/dmenu/patches/colored-caret/dmenu-colored-caret-5.2.diff b/tools.suckless.org/dmenu/patches/colored-caret/dmenu-colored-caret-5.2.diff @@ -0,0 +1,38 @@ + config.def.h | 1 + + dmenu.c | 4 ++-- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 1edb647..b41a8f0 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -12,6 +12,7 @@ static const char *colors[SchemeLast][2] = { + [SchemeNorm] = { "#bbbbbb", "#222222" }, + [SchemeSel] = { "#eeeeee", "#005577" }, + [SchemeOut] = { "#000000", "#00ffff" }, ++ [SchemeCaret] = { "#eeeeee", "#222222" }, + }; + /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ + static unsigned int lines = 0; + +diff --git a/dmenu.c b/dmenu.c +index 98507d9..fd916d7 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -26,7 +26,7 @@ + #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) + + /* enums */ +-enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ ++enum { SchemeNorm, SchemeSel, SchemeOut, SchemeCaret, SchemeLast }; /* color schemes */ + + struct item { + char *text; +@@ -147,7 +147,7 @@ drawmenu(void) + + curpos = TEXTW(text) - TEXTW(&text[cursor]); + if ((curpos += lrpad / 2 - 1) < w) { +- drw_setscheme(drw, scheme[SchemeNorm]); ++ drw_setscheme(drw, scheme[SchemeCaret]); + drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); + } diff --git a/tools.suckless.org/dmenu/patches/colored-caret/index.md b/tools.suckless.org/dmenu/patches/colored-caret/index.md @@ -0,0 +1,19 @@ +Colored Caret +============= + +Description +----------- +By default, dmenu does not give you the option to change its caret's color. If +you want to change the caret's color to something other than the default white +color, this plugin provides an option to do that. You just need to change the +`SchemeCaret` color in `config.h`. By default, it is set to the foreground color +for `SchemeSel`. Therefore, it will maintain dmenu's default appearance but give +you the ability to change another aspect of it. + +Download +-------- +[dmenu-colored-caret-5.2.diff](dmenu-colored-caret-5.2.diff) + +Authors +------- +* Amar Al-Zubaidi <amar.al-zubaidi45@tutanota.com>