summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-05-03 20:11:37 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-05-03 20:11:37 -0400
commitd9575acb88455977b16852360fed597d9415855f (patch)
tree29a5f62b6e599fd3665ce36172553d7010c61c88 /config.h
parente196d09b86326ffc2b8cb73e2747365504885e1a (diff)
copy urls with alt-y
Diffstat (limited to 'config.h')
-rw-r--r--config.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/config.h b/config.h
index b6c405f..9f1a6ec 100644
--- a/config.h
+++ b/config.h
@@ -207,7 +207,11 @@ MouseKey mkeys[] = {
};
static char *openurlcmd[] = { "/bin/sh", "-c",
- "sed 's/.*│//g' | tr -d '\n' | grep -aEo '((http|https)://|www\\.)[a-zA-Z0-9./?=_-]*' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -l 10 | xargs -r xdg-open",
+ "sed 's/.*│//g' | tr -d '\n' | grep -aEo '((http|https)://|www\\.)[a-zA-Z0-9./?=_-]*' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -p 'Follow which url?' -l 10 | xargs -r xdg-open",
+ "externalpipe", NULL };
+
+static char *copyurlcmd[] = { "/bin/sh", "-c",
+ "sed 's/.*│//g' | tr -d '\n' | grep -aEo '((http|https)://|www\\.)[a-zA-Z0-9./?=_-]*' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
"externalpipe", NULL };
static Shortcut shortcuts[] = {
@@ -242,6 +246,7 @@ static Shortcut shortcuts[] = {
{ MODKEY|ShiftMask, XK_U, zoom, {.f = +2} },
{ MODKEY|ShiftMask, XK_D, zoom, {.f = -2} },
{ MODKEY, XK_l, externalpipe, { .v = openurlcmd } },
+ { MODKEY, XK_y, externalpipe, { .v = copyurlcmd } },
};
/*