sandy

text editor
git clone git://git.suckless.org/sandy
Log | Files | Refs | README | LICENSE

commit 701bb2a262a35ba7d5aad3e2311449a0cecdbb50
parent 82451bf2c650d504b741be46b5c9e0f7d09a118a
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Sat, 17 Sep 2011 04:22:25 +0200

Simpler copy and paste pipe commands.
Diffstat:
config.def.h | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -41,14 +41,13 @@ static void f_pipenull(const Arg*); #define SAVEAS PROMPT("Save as:", "${SANDY_FILE}", "w") #define REPLACE PROMPT("Replace:", "", "!echo -n ") #define SED PROMPT("Sed:", "", "!sed ") -#define CMD_P PROMPT("Command:", "/\n?\nw\nq\n!\nsyntax\noffset\nicase\nro\nai", "") +#define CMD_P PROMPT("Command:", "/\n?\nw\nq\n!\nsyntax\noffset\nicase\nro\nai\ndump", "") /* Args to f_pipe and friends, simple examples are inlined instead */ -/* TODO: make sandy-sel to wrap xsel or standalone */ -#define TOCLIP { .v = "xsel -h >/dev/null 2>&1 && test -n \"$DISPLAY\" && xsel -ib || cat > /tmp/.sandy.clipboard.$USER" } -#define FROMCLIP { .v = "xsel -h >/dev/null 2>&1 && test -n \"$DISPLAY\" && xsel -ob || cat /tmp/.sandy.clipboard.$USER" } -#define TOSEL { .v = "xsel -h >/dev/null 2>&1 && test -n \"$DISPLAY\" && xsel -i || cat > /tmp/.sandy.selection.$USER" } -#define FROMSEL { .v = "xsel -h >/dev/null 2>&1 && test -n \"$DISPLAY\" && xsel -o || cat /tmp/.sandy.selection.$USER" } +#define TOCLIP { .v = "tee /tmp/.sandy.clipboard.$USER | xsel -ib 2>/dev/null" } +#define FROMCLIP { .v = "xsel -ob 2>/dev/null || cat /tmp/.sandy.clipboard.$USER" } +#define TOSEL { .v = "tee /tmp/.sandy.selection.$USER | xsel -i 2>/dev/null" } +#define FROMSEL { .v = "xsel -o 2>/dev/null || cat /tmp/.sandy.selection.$USER" } #define AUTOINDENT { .v = "awk 'BEGIN{ l=\"\\n\" }; \ { if(match($0, \"^[\t ]+[^\t ]\")) l=substr($0, RSTART, RLENGTH-1); \ else l=\"\"; \