[wiki] [sites] wiki updated
changeset: 593:6b6dc4aba3a0
tag: tip
user: Rob Pilling <my name at gmail dot com>
date: Fri Jul 23 18:40:18 2010 +0100
files: tools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff
description:
Added incremental patch for dmenu tip
diff -r 0bc58adf774f -r 6b6dc4aba3a0 tools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff Fri Jul 23 18:40:18 2010 +0100
_AT_@ -0,0 +1,61 @@
+diff -r 67d8f41d51d7 dmenu.1
+--- a/dmenu.1 Fri Jul 02 06:49:05 2010 +0100
++++ b/dmenu.1 Fri Jul 23 18:32:04 2010 +0100
+_AT_@ -5,6 +5,7 @@
+ .B dmenu
+ .RB [ \-i ]
+ .RB [ \-b ]
++.RB [ \-r ]
+ .RB [ \-e " <xid>]"
+ .RB [ \-l " <lines>]"
+ .RB [ \-fn " <font>]"
+_AT_@ -38,6 +39,9 @@
+ .B \-b
+ defines that dmenu appears at the bottom.
+ .TP
++.B \-r
++outputs the entered text, incrementally.
++.TP
+ .B \-e <xid>
+ reparents dmenu to the window specified by xid.
+ .TP
+diff -r 67d8f41d51d7 dmenu.c
+--- a/dmenu.c Fri Jul 02 06:49:05 2010 +0100
++++ b/dmenu.c Fri Jul 23 18:32:04 2010 +0100
+_AT_@ -34,6 +34,7 @@
+ static char *maxname = NULL;
+ static unsigned int cmdw = 0;
+ static unsigned int lines = 0;
++static int incremental = 0;
+ static Item *allitems = NULL; /* first of all items */
+ static Item *item = NULL; /* first of pattern matching items */
+ static Item *sel = NULL;
+_AT_@ -331,6 +332,10 @@
+ dinput();
+ break;
+ }
++ if(incremental) {
++ fprintf(stdout, "%s\n", text);
++ fflush(stdout);
++ }
+ drawbar();
+ }
+
+_AT_@ -413,6 +418,8 @@
+ }
+ else if(!strcmp(argv[i], "-b"))
+ topbar = False;
++ else if(!strcmp(argv[i], "-r"))
++ incremental = 1;
+ else if(!strcmp(argv[i], "-l")) {
+ if(++i < argc) lines = atoi(argv[i]);
+ if(lines > 0)
+_AT_@ -441,7 +448,7 @@
+ exit(EXIT_SUCCESS);
+ }
+ else {
+- fputs("usage: dmenu [-i] [-b] [-l <lines>] [-fn <font>] [-nb <color>]\n"
++ fputs("usage: dmenu [-i] [-b] [-r] [-l <lines>] [-fn <font>] [-nb <color>]\n"
+ " [-nf <color>] [-p <prompt>] [-sb <color>] [-sf <color>] [-v]\n", stderr);
+ exit(EXIT_FAILURE);
+ }
Received on Fri Jul 23 2010 - 19:37:04 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:31:23 CEST