sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 92c1e4de89e7ade9603ba8d154b944bf53eb72c8
parent 88c7e51cc6391b2714fb50b03be7e3b052d7b401
Author: Rob Pilling <my name at gmail dot com>
Date:   Fri, 23 Jul 2010 18:40:18 +0100

Added incremental patch for dmenu tip
Diffstat:
Atools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff b/tools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff @@ -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 +@@ -5,6 +5,7 @@ + .B dmenu + .RB [ \-i ] + .RB [ \-b ] ++.RB [ \-r ] + .RB [ \-e " <xid>]" + .RB [ \-l " <lines>]" + .RB [ \-fn " <font>]" +@@ -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 +@@ -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; +@@ -331,6 +332,10 @@ + dinput(); + break; + } ++ if(incremental) { ++ fprintf(stdout, "%s\n", text); ++ fflush(stdout); ++ } + drawbar(); + } + +@@ -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) +@@ -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); + }