aboutsummaryrefslogtreecommitdiffstats
path: root/config.h
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-12 16:51:10 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-12 16:51:10 +0100
commitad4f3fff895a7af481275e16c72d8ec5fe88221e (patch)
treec6e21c212af946a7f5a54b84eda0cb40ea59e834 /config.h
parentKeybinds update (diff)
downloadst-ad4f3fff895a7af481275e16c72d8ec5fe88221e.tar.gz
st-ad4f3fff895a7af481275e16c72d8ec5fe88221e.tar.bz2
st-ad4f3fff895a7af481275e16c72d8ec5fe88221e.tar.xz
st-ad4f3fff895a7af481275e16c72d8ec5fe88221e.tar.zst
st-ad4f3fff895a7af481275e16c72d8ec5fe88221e.zip
Key update and new patch
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} },
};
/*