[wiki] [sites] fixed dmenu pipeout patch name || Ayrton

From: <git_AT_suckless.org>
Date: Fri, 01 Jul 2016 17:19:11 +0200

commit 88bf5f7ceed51fc6cd6861723ba230f305097084
Author: Ayrton <a.munoz3327_AT_gmail.com>
Date: Fri Jul 1 11:17:39 2016 -0400

    fixed dmenu pipeout patch name
    
    also cleaned up the patch description

diff --git a/tools.suckless.org/dmenu/patches/dmenu-4.6-pipeout.diff b/tools.suckless.org/dmenu/patches/dmenu-4.6-pipeout.diff
deleted file mode 100644
index 85c0054..0000000
--- a/tools.suckless.org/dmenu/patches/dmenu-4.6-pipeout.diff
+++ /dev/null
_AT_@ -1,44 +0,0 @@
-diff --git a/config.def.h b/config.def.h
-index dcffd38..8c18a07 100644
---- a/config.def.h
-+++ b/config.def.h
-_AT_@ -20,4 +20,5 @@ static unsigned int lines = 0;
- * Characters not considered part of a word while deleting words
- * for example: " /?\"&[]"
- */
-+static const char startpipe[] = "#";
- static const char worddelimiters[] = " ";
-diff --git a/dmenu.c b/dmenu.c
-index e0c2f80..9ed07bc 100644
---- a/dmenu.c
-+++ b/dmenu.c
-_AT_@ -35,6 +35,7 @@ struct item {
- };
-
- static char text[BUFSIZ] = "";
-+static char pipeout[8] = " | dmenu";
- static int bh, mw, mh;
- static int sw, sh; /* X display screen geometry width, height */
- static int inputw, promptw;
-_AT_@ -416,7 +417,20 @@ keypress(XKeyEvent *ev)
- break;
- case XK_Return:
- case XK_KP_Enter:
-- puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
-+ if ((sel && !(ev->state & ShiftMask))) {
-+ if (sel->text[0] == startpipe[0]) {
-+ strncpy(sel->text + strlen(sel->text),pipeout,8);
-+ puts(sel->text+1);
-+ }
-+ puts(sel->text);
-+ }
-+ else {
-+ if (text[0] == startpipe[0]) {
-+ strncpy(text + strlen(text),pipeout,8);
-+ puts(text+1);
-+ }
-+ puts(text);
-+ }
- if (!(ev->state & ControlMask)) {
- cleanup();
- exit(0);
diff --git a/tools.suckless.org/dmenu/patches/dmenu-pipeout-20160701-bd9cc9c.diff b/tools.suckless.org/dmenu/patches/dmenu-pipeout-20160701-bd9cc9c.diff
new file mode 100644
index 0000000..85c0054
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/dmenu-pipeout-20160701-bd9cc9c.diff
_AT_@ -0,0 +1,44 @@
+diff --git a/config.def.h b/config.def.h
+index dcffd38..8c18a07 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -20,4 +20,5 @@ static unsigned int lines = 0;
+ * Characters not considered part of a word while deleting words
+ * for example: " /?\"&[]"
+ */
++static const char startpipe[] = "#";
+ static const char worddelimiters[] = " ";
+diff --git a/dmenu.c b/dmenu.c
+index e0c2f80..9ed07bc 100644
+--- a/dmenu.c
++++ b/dmenu.c
+_AT_@ -35,6 +35,7 @@ struct item {
+ };
+
+ static char text[BUFSIZ] = "";
++static char pipeout[8] = " | dmenu";
+ static int bh, mw, mh;
+ static int sw, sh; /* X display screen geometry width, height */
+ static int inputw, promptw;
+_AT_@ -416,7 +417,20 @@ keypress(XKeyEvent *ev)
+ break;
+ case XK_Return:
+ case XK_KP_Enter:
+- puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
++ if ((sel && !(ev->state & ShiftMask))) {
++ if (sel->text[0] == startpipe[0]) {
++ strncpy(sel->text + strlen(sel->text),pipeout,8);
++ puts(sel->text+1);
++ }
++ puts(sel->text);
++ }
++ else {
++ if (text[0] == startpipe[0]) {
++ strncpy(text + strlen(text),pipeout,8);
++ puts(text+1);
++ }
++ puts(text);
++ }
+ if (!(ev->state & ControlMask)) {
+ cleanup();
+ exit(0);
diff --git a/tools.suckless.org/dmenu/patches/pipeout.md b/tools.suckless.org/dmenu/patches/pipeout.md
index 6a417ee..3e8cb8c 100644
--- a/tools.suckless.org/dmenu/patches/pipeout.md
+++ b/tools.suckless.org/dmenu/patches/pipeout.md
_AT_@ -4,12 +4,17 @@ pipeout
 Description
 -----------
 
-This patch allows the selected text to be piped back out with dmenu. This is useful if you want to display the output of a command.
+This patch allows the selected text to be piped back out with dmenu. This is useful if you want to display the output of a command on the screen. Only text starting with the character '#' is piped out by default.
+
+Configuration
+-------------
+Set the variable 'startpipe' in config.h to any character.
+
 
 Download
 --------
 
-* [dmenu-4.6-pipeout.diff](dmenu-4.6-pipeout.diff)
+* [dmenu-pipeout-20160701-bd9cc9c.diff](dmenu-pipeout-20160701-bd9cc9c.diff)
 
 Author
 ------
Received on Fri Jul 01 2016 - 17:19:11 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 01 2016 - 17:24:14 CEST