[wiki] [sites] [dmenu][patch][colored-caret] initial commit || amarakon

From: <git_AT_suckless.org>
Date: Tue, 18 Oct 2022 06:51:04 +0200

commit d991895444ead75929062ac7a4d835b88c16e246
Author: amarakon <amar.al-zubaidi45_AT_tutanota.com>
Date: Tue Oct 18 00:47:11 2022 -0400

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

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
new file mode 100644
index 00000000..0482b350
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/colored-caret/dmenu-colored-caret-5.2.diff
_AT_@ -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
+_AT_@ -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
+_AT_@ -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;
+_AT_@ -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
new file mode 100644
index 00000000..612aaef1
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/colored-caret/index.md
_AT_@ -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_AT_tutanota.com>
Received on Tue Oct 18 2022 - 06:51:04 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 18 2022 - 07:00:52 CEST