summaryrefslogtreecommitdiff
path: root/dmenu.c.rej
diff options
context:
space:
mode:
authorjustsaumit <justsaumit@draconyan.xyz>2022-03-02 09:51:28 +0530
committerjustsaumit <justsaumit@draconyan.xyz>2022-03-02 09:51:28 +0530
commit2781cf2a74772f02a7dad181a251d839c6d21385 (patch)
tree0393431ca40c2b4e3933d0cbc74e727ecc14c388 /dmenu.c.rej
parent21aa33f08ff6ba1fc9181c25da718a07f4b18154 (diff)
instant patch (-n)
Diffstat (limited to 'dmenu.c.rej')
-rw-r--r--dmenu.c.rej22
1 files changed, 22 insertions, 0 deletions
diff --git a/dmenu.c.rej b/dmenu.c.rej
new file mode 100644
index 0000000..67eb339
--- /dev/null
+++ b/dmenu.c.rej
@@ -0,0 +1,22 @@
+--- dmenu.c
++++ dmenu.c
+@@ -643,7 +650,7 @@ setup(void)
+ static void
+ usage(void)
+ {
+- fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
++ fputs("usage: dmenu [-bfinv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
+ exit(1);
+ }
+@@ -666,7 +673,9 @@ main(int argc, char *argv[])
+ else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
+ fstrncmp = strncasecmp;
+ fstrstr = cistrstr;
+- } else if (i + 1 == argc)
++ } else if (!strcmp(argv[i], "-n")) /* instant select only match */
++ instant = 1;
++ else if (i + 1 == argc)
+ usage();
+ /* these options take one argument */
+ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */