Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (4a3e883488a33fe331726c6907ae8448b99a78d0)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (4a3e883488a33fe331726c6907ae8448b99a78d0)
  • Date: Wed, 21 Sep 2022 03:42:22 +0000

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

utils/dmenu/DETAILS | 5 ++++
utils/dmenu/HISTORY | 5 ++++
utils/dmenu/PREPARE | 1
utils/dmenu/PRE_BUILD | 28 ++++++++++++++++++++++++--
utils/dmenu/fuzzyhighlight_xra.patch | 37
+++++++++++++++++++++++++++++++++++
utils/dmenu/fuzzymatch_xra.patch | 25 +++++++++++++++++++++++
utils/dmenu/xresources-alt_fhl.patch | 32 ++++++++++++++++++++++++++++++
7 files changed, 131 insertions(+), 2 deletions(-)

New commits:
commit 4a3e883488a33fe331726c6907ae8448b99a78d0
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

dmenu: add xresources-alt patch option

diff --git a/utils/dmenu/DETAILS b/utils/dmenu/DETAILS
index 7f50b20..67c5dda 100755
--- a/utils/dmenu/DETAILS
+++ b/utils/dmenu/DETAILS
@@ -40,6 +40,11 @@ if [[ $DMENU_FUZZYHIGHLIGHT == y ]]; then

SOURCE8_URL=https://tools.suckless.org/${SPELL}/patches/fuzzyhighlight/${SOURCE8}

SOURCE8_HASH=sha512:ce806c6481b20d5b2352fc387816878c75285162f6404b3a969a95f9dbd6c7476fd4c6571f260886fa30ccc40e4a388ea8f6902e40ff90447e04bec3faf0669d
fi
+if [[ $DMENU_XRESOURCES_ALT == y ]]; then
+ SOURCE9=${SPELL}-xresources-alt-${PATCH2_VERSION}.diff
+
SOURCE9_URL=https://tools.suckless.org/${SPELL}/patches/xresources-alt/${SOURCE9}
+
SOURCE9_HASH=sha512:ddd20d6c2f5e57fc8c60be53943d10656f6e41558750e28050ca23858aa0e7fe3b189788419e6a87cb24a85f0ab8c83a486320023117b4a4734a80882d1265a8
+fi
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
WEB_SITE=https://tools.suckless.org/dmenu
ENTERED=20061230
diff --git a/utils/dmenu/HISTORY b/utils/dmenu/HISTORY
index 918d114..aecdebc 100644
--- a/utils/dmenu/HISTORY
+++ b/utils/dmenu/HISTORY
@@ -1,3 +1,8 @@
+2022-09-20 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS, PRE_BUILD, PREPARE: add xresources alt patch option
+ * fuzzyhighlight_xra.patch, fuzzymatch_xra.patch,
+ xresources-alt_fhl.patch: added
+
2022-07-09 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: updated spell to 5.1
* BUILD: dropped CC var to fix build
diff --git a/utils/dmenu/PREPARE b/utils/dmenu/PREPARE
index 524e6e6..9327480 100755
--- a/utils/dmenu/PREPARE
+++ b/utils/dmenu/PREPARE
@@ -4,6 +4,7 @@ config_query DMENU_NUMBERS "Apply dmenu numbers patch?" n &&
config_query DMENU_MOUSE_SUPPORT "Apply dmenu mouse support patch?" n &&
config_query DMENU_XYW "Apply xyw patch?" n &&
config_query DMENU_FUZZYMATCH "Apply fuzzymatch patch?" n &&
+config_query DMENU_XRESOURCES_ALT "Apply xresources alt patch?" n &&

if [[ $DMENU_FUZZYMATCH == y ]]; then
config_query DMENU_FUZZYHIGHLIGHT "Apply fuzzyhighlight patch?" n
diff --git a/utils/dmenu/PRE_BUILD b/utils/dmenu/PRE_BUILD
index 90a4b9e..f3e168c 100755
--- a/utils/dmenu/PRE_BUILD
+++ b/utils/dmenu/PRE_BUILD
@@ -13,6 +13,18 @@ if [[ $DMENU_LINEHEIGHT == y ]]; then
cat ${SOURCE_CACHE}/${SOURCE3} | sed "s:@@ -683,6 +684,7 @@:@@ -685,6
+686,7 @@:" | patch -p1 -F3 # ignore context in case previous patch was
applied
fi &&

+if [[ $DMENU_XRESOURCES_ALT == y ]]; then
+ verify_file 9 &&
+
+ if [[ $DMENU_FUZZYHIGHLIGHT == y ]]; then
+ cat ${SOURCE_CACHE}/${SOURCE9} > "${SOURCE_DIRECTORY}/${SOURCE9}" &&
+ patch -p0 < "${SPELL_DIRECTORY}/xresources-alt_fhl.patch" &&
+ patch -p1 < "${SOURCE_DIRECTORY}/${SOURCE9}"
+ else
+ cat ${SOURCE_CACHE}/${SOURCE9} | patch -p1
+ fi
+fi &&
+
if [[ $DMENU_MOUSE_SUPPORT == y ]]; then
verify_file 4 &&

@@ -43,7 +55,13 @@ if [[ $DMENU_FUZZYMATCH == y ]]; then
verify_file 7 &&

cat ${SOURCE_CACHE}/${SOURCE7} > "${SOURCE_DIRECTORY}/${SOURCE7}" &&
- patch -p0 < "${SPELL_DIRECTORY}/fuzzymatch.patch" &&
+
+ if [[ $DMENU_XRESOURCES_ALT == y ]]; then
+ patch -p0 < "${SPELL_DIRECTORY}/fuzzymatch_xra.patch"
+ else
+ patch -p0 < "${SPELL_DIRECTORY}/fuzzymatch.patch"
+ fi &&
+
patch -p1 < "${SOURCE_DIRECTORY}/${SOURCE7}" &&

sedit "s:-bfi:-bfiF:" "${SOURCE_DIRECTORY}/dmenu.c"
@@ -53,7 +71,13 @@ if [[ $DMENU_FUZZYHIGHLIGHT == y ]]; then
verify_file 8 &&

cat ${SOURCE_CACHE}/${SOURCE8} > "${SOURCE_DIRECTORY}/${SOURCE8}" &&
- patch -p0 < "${SPELL_DIRECTORY}/fuzzyhighlight.patch" &&
+
+ if [[ $DMENU_XRESOURCES_ALT == y ]]; then
+ patch -p0 < "${SPELL_DIRECTORY}/fuzzyhighlight_xra.patch"
+ else
+ patch -p0 < "${SPELL_DIRECTORY}/fuzzyhighlight.patch"
+ fi &&
+
patch -p1 -F3 < "${SOURCE_DIRECTORY}/${SOURCE8}"
fi &&

diff --git a/utils/dmenu/fuzzyhighlight_xra.patch
b/utils/dmenu/fuzzyhighlight_xra.patch
new file mode 100644
index 0000000..2b95809
--- /dev/null
+++ b/utils/dmenu/fuzzyhighlight_xra.patch
@@ -0,0 +1,37 @@
+--- dmenu-fuzzyhighlight-4.9.diff.orig 2022-08-21 22:26:54.869427346 -0700
++++ dmenu-fuzzyhighlight-4.9.diff 2022-09-20 17:44:36.386757867 -0700
+@@ -6,11 +6,11 @@
+ +++ dmenu-4.9-fuzzyhighlight/config.def.h 2020-04-04 10:26:36.990890854
+0200
+ @@ -11,6 +11,8 @@ static const char *colors[SchemeLast][2]
+ /* fg bg */
+- [SchemeNorm] = { "#bbbbbb", "#222222" },
+- [SchemeSel] = { "#eeeeee", "#005577" },
++ [SchemeNorm] = { normfgcolor, normbgcolor },
++ [SchemeSel] = { selfgcolor, selbgcolor },
+ + [SchemeSelHighlight] = { "#ffc978", "#005577" },
+ + [SchemeNormHighlight] = { "#ffc978", "#222222" },
+- [SchemeOut] = { "#000000", "#00ffff" },
++ [SchemeOut] = { "#000000", "#00ffff" },
+ };
+ /* -l option; if nonzero, dmenu uses vertical list with given number of
lines */
+ diff -upN dmenu-4.9/dmenu.1 dmenu-4.9-fuzzyhighlight/dmenu.1
+--- dmenu-fuzzyhighlight-4.9.diff.orig 2020-04-12 04:50:28.000000000 -0700
++++ dmenu-fuzzyhighlight-4.9.diff 2020-11-25 23:06:28.669246836 -0800
+@@ -82,7 +82,7 @@
+ + ? SchemeSelHighlight
+ + : SchemeNormHighlight]);
+ + for (i = 0, highlight = item->text; *highlight && text[i];) {
+-+ if (*highlight == text[i]) {
+++ if (!fstrncmp(&(*highlight), &text[i], 1)) {
+ + /* get indentation */
+ + c = *highlight;
+ + *highlight = '\0';
+@@ -120,7 +120,7 @@
+
+ - return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
+ + r = drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
+-+ drawhighlights(item, x, y, w);
+++ if (fuzzy) drawhighlights(item, x, y, w);
+ + return r;
+ }
+
diff --git a/utils/dmenu/fuzzymatch_xra.patch
b/utils/dmenu/fuzzymatch_xra.patch
new file mode 100644
index 0000000..233fc71
--- /dev/null
+++ b/utils/dmenu/fuzzymatch_xra.patch
@@ -0,0 +1,25 @@
+--- dmenu-fuzzymatch-4.9.diff.orig 2022-08-21 22:26:54.107429572 -0700
++++ dmenu-fuzzymatch-4.9.diff 2022-09-20 17:37:18.651570582 -0700
+@@ -17,8 +17,10 @@
+ /* Default settings; can be overriden by command line. */
+
+ static int topbar = 1; /* -b option; if 0, dmenu
appears at bottom */
+-+static int fuzzy = 1; /* -F option; if 0, dmenu
doesn't use fuzzy matching */
++
+++static int fuzzy = 0; /* -F option; if 0, dmenu
doesn't use fuzzy matching */
+ /* -fn option overrides fonts[0]; default X11 font or font set */
++ static char font[] = "monospace:size=10";
+ static const char *fonts[] = {
+ "monospace:size=10"
+ diff --git a/config.mk b/config.mk
+@@ -153,8 +155,8 @@
+ topbar = 0;
+ else if (!strcmp(argv[i], "-f")) /* grabs keyboard before
reading stdin */
+ fast = 1;
+-+ else if (!strcmp(argv[i], "-F")) /* grabs keyboard before
reading stdin */
+-+ fuzzy = 0;
+++ else if (!strcmp(argv[i], "-F")) /* fuzzy matching */
+++ fuzzy = 1;
+ else if (!strcmp(argv[i], "-i")) { /* case-insensitive item
matching */
+ fstrncmp = strncasecmp;
+ fstrstr = cistrstr;
diff --git a/utils/dmenu/xresources-alt_fhl.patch
b/utils/dmenu/xresources-alt_fhl.patch
new file mode 100644
index 0000000..2baab60
--- /dev/null
+++ b/utils/dmenu/xresources-alt_fhl.patch
@@ -0,0 +1,32 @@
+--- dmenu-xresources-alt-5.0.diff.orig 2022-09-20 17:13:24.468960699 -0700
++++ dmenu-xresources-alt-5.0.diff 2022-09-20 18:06:15.642577350 -0700
+@@ -18,10 +18,10 @@
+ +
+ +static char *prompt = NULL; /* -p option; prompt to the left of
input field */
+ +
+-+static char normfgcolor[] = "#bbbbbb";
+-+static char normbgcolor[] = "#222222";
+-+static char selfgcolor[] = "#eeeeee";
+-+static char selbgcolor[] = "#005577";
+++static char normfgcolor[] = "#bbbbbb", normhlfgcolor[] = "#ffc978";
+++static char normbgcolor[] = "#222222", normhlbgcolor[] = "#222222";
+++static char selfgcolor[] = "#eeeeee", selhlfgcolor[] = "#ffc978";
+++static char selbgcolor[] = "#005577", selhlbgcolor[] = "#005577";
+ +static char *colors[SchemeLast][2] = {
+ /* fg bg */
+ - [SchemeNorm] = { "#bbbbbb", "#222222" },
+@@ -43,10 +43,10 @@
+ + */
+ +ResourcePref resources[] = {
+ + { "font", STRING, &font },
+-+ { "normfgcolor", STRING, &normfgcolor },
+-+ { "normbgcolor", STRING, &normbgcolor },
+-+ { "selfgcolor", STRING, &selfgcolor },
+-+ { "selbgcolor", STRING, &selbgcolor },
+++ { "normfgcolor", STRING, &normfgcolor }, { "normhlfgcolor", STRING,
&normhlfgcolor },
+++ { "normbgcolor", STRING, &normbgcolor }, { "normhlbgcolor", STRING,
&normhlbgcolor },
+++ { "selfgcolor", STRING, &selfgcolor }, { "selhlfgcolor", STRING,
&selhlfgcolor },
+++ { "selbgcolor", STRING, &selbgcolor }, { "selhlbgcolor", STRING,
&selhlbgcolor },
+ + { "prompt", STRING, &prompt },
+ +};
+ diff -rupN orig/dmenu.c patched/dmenu.c



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (4a3e883488a33fe331726c6907ae8448b99a78d0), Vlad Glagolev, 09/20/2022

Archive powered by MHonArc 2.6.24.

Top of Page