aboutsummaryrefslogtreecommitdiffstats
path: root/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.h')
-rw-r--r--config.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/config.h b/config.h
index 97a8399..3ebaab9 100644
--- a/config.h
+++ b/config.h
@@ -202,6 +202,11 @@ static MouseShortcut mshortcuts[] = {
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
+static char *cpyurlcmd[] = { "/bin/sh", "-c",
+ "tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./@$&%?$#=_-~]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' ); IFS=; [ ! -z $tmp ] && echo $tmp | dmenu -i -l 10 | tr -d '\n' | xclip -selection clipboard",
+ "externalpipe", NULL };
+static char *cpyoutcmd[] = { "/bin/sh", "-c", "/usr/local/bin/st-cpyout", "externalpipe", NULL };
+
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
@@ -219,6 +224,12 @@ static Shortcut shortcuts[] = {
{ ControlMask|Mod1Mask, XK_c, keyboard_select,{.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
+ { TERMMOD, XK_U, kscrollup, {.i = -1} },
+ { TERMMOD, XK_D, kscrolldown, {.i = -1} },
+ { TERMMOD, XK_K, kscrollup, {.i = 1} },
+ { TERMMOD, XK_J, kscrolldown, {.i = 1} },
+ { TERMMOD, XK_Y, externalpipe, {.v = cpyurlcmd} },
+ { TERMMOD, XK_O, externalpipe, {.v = cpyoutcmd} },
};
/*