[wiki] [sites] [dmenu][patch][vi_mode] Add Ctrl + Enter behavior || zerg
commit ee6b95c8c4694d7e1766919cfee98002fe8101b5
Author: zerg <zergrusherncrusher_AT_disroot.org>
Date: Sun Apr 16 15:06:58 2023 -0700
[dmenu][patch][vi_mode] Add Ctrl + Enter behavior
diff --git a/tools.suckless.org/dmenu/patches/vi-mode/dmenu-vi_mode-20230330-dfbbf7f.diff b/tools.suckless.org/dmenu/patches/vi-mode/dmenu-vi_mode-20230416-0fe460d.diff
similarity index 96%
rename from tools.suckless.org/dmenu/patches/vi-mode/dmenu-vi_mode-20230330-dfbbf7f.diff
rename to tools.suckless.org/dmenu/patches/vi-mode/dmenu-vi_mode-20230416-0fe460d.diff
index a1cb43c7..514b684c 100644
--- a/tools.suckless.org/dmenu/patches/vi-mode/dmenu-vi_mode-20230330-dfbbf7f.diff
+++ b/tools.suckless.org/dmenu/patches/vi-mode/dmenu-vi_mode-20230416-0fe460d.diff
_AT_@ -27,7 +27,7 @@ index 1edb647..7bf5f4a 100644
+ { XK_q, 0 }
+};
diff --git a/dmenu.c b/dmenu.c
-index 4e7df12..14fbde3 100644
+index 62f1089..8066271 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -26,7 +26,7 @@
_AT_@ -76,7 +76,7 @@ index 4e7df12..14fbde3 100644
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
}
-_AT_@ -321,6 +335,179 @@ movewordedge(int dir)
+_AT_@ -321,6 +335,181 @@ movewordedge(int dir)
}
}
_AT_@ -108,6 +108,8 @@ index 4e7df12..14fbde3 100644
+ case XK_c:
+ cleanup();
+ exit(1);
++ case XK_Return: /* fallthrough */
++ case XK_KP_Enter: break;
+ default: return;
+ }
+ }
_AT_@ -256,7 +258,7 @@ index 4e7df12..14fbde3 100644
static void
keypress(XKeyEvent *ev)
{
-_AT_@ -340,6 +527,18 @@ keypress(XKeyEvent *ev)
+_AT_@ -340,6 +529,18 @@ keypress(XKeyEvent *ev)
break;
}
_AT_@ -275,7 +277,7 @@ index 4e7df12..14fbde3 100644
if (ev->state & ControlMask) {
switch(ksym) {
case XK_a: ksym = XK_Home; break;
-_AT_@ -543,6 +742,8 @@ paste(void)
+_AT_@ -543,6 +744,8 @@ paste(void)
insert(p, (q = strchr(p, '
')) ? q - p : (ssize_t)strlen(p));
XFree(p);
}
_AT_@ -284,7 +286,7 @@ index 4e7df12..14fbde3 100644
drawmenu();
}
-_AT_@ -737,6 +938,11 @@ main(int argc, char *argv[])
+_AT_@ -738,6 +941,11 @@ main(int argc, char *argv[])
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
fstrncmp = strncasecmp;
fstrstr = cistrstr;
Received on Mon Apr 17 2023 - 00:08:30 CEST
This archive was generated by hypermail 2.3.0
: Mon Apr 17 2023 - 00:12:55 CEST