diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-29 19:59:53 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-29 19:59:58 +0100 |
commit | 810745c1d2659c50a687ee3b733c4802d12c71b4 (patch) | |
tree | c53ce027621926c140f8571c8c8124cc3499b6ad /config.h | |
parent | Fix (diff) | |
download | st-810745c1d2659c50a687ee3b733c4802d12c71b4.tar.gz st-810745c1d2659c50a687ee3b733c4802d12c71b4.tar.bz2 st-810745c1d2659c50a687ee3b733c4802d12c71b4.tar.xz st-810745c1d2659c50a687ee3b733c4802d12c71b4.tar.zst st-810745c1d2659c50a687ee3b733c4802d12c71b4.zip |
Removed need for urlview
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -203,9 +203,12 @@ static MouseShortcut mshortcuts[] = { #define MODKEY Mod1Mask #define TERMMOD (ControlMask|ShiftMask) -static char *cpyurlcmd[] = { "/bin/sh", "-c", +static char *yankurlcmd[] = { "/bin/sh", "-c", "tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https|gopher|gemini|ftp|ftps|git|ssh)://|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 *linkviewcmd[] = { "/bin/sh", "-c", + "/usr/local/bin/st -e sh -c \"linkview $(tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https|gopher|gemini|ftp|ftps|git|ssh)://|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' | cat)\"", + "externalpipe", NULL }; static char *cpyoutcmd[] = { "/bin/sh", "-c", "/usr/local/bin/st-cpyout", "externalpipe", NULL }; static char *cpyoutnopcmd[] = { "/bin/sh", "-c", "/usr/local/bin/st-cpyout noprompt", "externalpipe", NULL }; @@ -229,7 +232,8 @@ static Shortcut shortcuts[] = { { 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_Y, externalpipe, {.v = yankurlcmd} }, + { TERMMOD, XK_I, externalpipe, {.v = linkviewcmd} }, { TERMMOD, XK_O, externalpipe, {.v = cpyoutcmd} }, { TERMMOD, XK_P, externalpipe, {.v = cpyoutnopcmd} }, }; |