From 7a7c5f8bfdd4c41d36f98a4d92494d678dd185f4 Mon Sep 17 00:00:00 2001 From: Hekuran Date: Mon, 30 Nov 2020 20:45:38 +0100 Subject: fixed not being able to copy URL with a dash in it --- config.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'config.h') diff --git a/config.h b/config.h index a6c70ac..feabb62 100644 --- a/config.h +++ b/config.h @@ -234,11 +234,13 @@ MouseKey mkeys[] = { { Button5, TERMMOD, zoom, {.f = -1} }, }; -static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler", "externalpipe", NULL }; +static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -o", "externalpipe", NULL }; -static char *copyurlcmd[] = { "/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 -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard", - "externalpipe", NULL }; +static char *copyurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -c", "externalpipe", NULL }; + +/* static char *copyurlcmd[] = { "/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 -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard", */ +/* "externalpipe", NULL }; */ static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL }; -- cgit v1.2.3