[wiki] [sites] wiki updated
changeset: 710:07c95b8440fa
tag: tip
user: Rob Pilling <my name at gmail dot com>
date: Sun Mar 20 19:28:25 2011 +0000
files: tools.suckless.org/dmenu/patches/dmenu-4.2.1-fastgrab.diff tools.suckless.org/dmenu/patches/fastgrab.md
description:
Added fastgrab patch
diff -r d4830f5b617d -r 07c95b8440fa tools.suckless.org/dmenu/patches/dmenu-4.2.1-fastgrab.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/dmenu/patches/dmenu-4.2.1-fastgrab.diff Sun Mar 20 19:28:25 2011 +0000
_AT_@ -0,0 +1,50 @@
+diff -r a79e4a9cb167 dmenu.c
+--- a/dmenu.c Sat Nov 20 09:25:08 2010 +0000
++++ b/dmenu.c Fri Feb 18 04:24:31 2011 +0000
+_AT_@ -66,6 +68,7 @@
+ int
+ main(int argc, char *argv[]) {
+ int i;
++ Bool fastgrab = False;
+
+ progname = "dmenu";
+ for(i = 1; i < argc; i++)
+_AT_@ -78,6 +81,10 @@
+ topbar = False;
+ else if(!strcmp(argv[i], "-i"))
+ fstrncmp = strncasecmp;
++ else if(!strcmp(argv[i], "-f"))
++ fastgrab = True;
+ else if(i == argc-1)
+ usage();
+ /* double flags */
+_AT_@ -101,15 +108,61 @@
+ usage();
+
+ dc = initdc();
+ initfont(dc, font);
++
++ if(fastgrab)
++ setup(); /* grab X _now_ */
++
+ readstdin();
+- setup();
++
++ if(!fastgrab)
++ setup();
++ else
++ match(); /* need to re-match now we've read the input */
++
+ run();
+
+ return EXIT_FAILURE; /* should not reach */
+ }
+_AT_@ -536,7 +594,7 @@
+
+ void
+ usage(void) {
+- fputs("usage: dmenu [-b] [-i] [-l lines] [-m monitor] [-p prompt] [-fn font]\n"
++ fputs("usage: dmenu [-b] [-i] [-f] [-l lines] [-m monitor] [-p prompt] [-fn font]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-v]\n", stderr);
+ exit(EXIT_FAILURE);
+ }
diff -r d4830f5b617d -r 07c95b8440fa tools.suckless.org/dmenu/patches/fastgrab.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/dmenu/patches/fastgrab.md Sun Mar 20 19:28:25 2011 +0000
_AT_@ -0,0 +1,11 @@
+FAST GRAB
+=========
+
+This patch causes dmenu to grab the X11 keyboard before reading input.
+
+This is useful if your machine isn't too snappy, or if your input to dmenu takes a while to complete.
+
+Download
+--------
+
+* [dmenu-4.2.1-fastgrab.diff](dmenu-4.2.1-fastgrab.diff)
Received on Sun Mar 20 2011 - 20:28:55 CET
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:31:41 CEST