dmenu prompt is only shown if there's atleast one link
This commit is contained in:
parent
6725a2fde0
commit
8ba5325adb
4
config.h
4
config.h
@ -222,11 +222,11 @@ MouseKey mkeys[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static char *openurlcmd[] = { "/bin/sh", "-c",
|
static char *openurlcmd[] = { "/bin/sh", "-c",
|
||||||
"sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?$#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)'| uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -i -p 'Follow which url?' -l 10 | xargs -r xdg-open",
|
"shopt -s lastpipe; set +m;sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?$#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)'| uniq | sed 's/^www./http:\\/\\/www\\./g' | read tmp && echo $tmp | grep -q . && echo $tmp | dmenu -i -p 'Follow which url?' -l 10 | xargs -r xdg-open",
|
||||||
"externalpipe", NULL };
|
"externalpipe", NULL };
|
||||||
|
|
||||||
static char *copyurlcmd[] = { "/bin/sh", "-c",
|
static char *copyurlcmd[] = { "/bin/sh", "-c",
|
||||||
"sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?$#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
|
"shopt -s lastpipe; set +m;sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?$#=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' | read tmp && echo $tmp | grep -q . && echo $tmp | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
|
||||||
"externalpipe", NULL };
|
"externalpipe", NULL };
|
||||||
|
|
||||||
static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
|
static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
|
||||||
|
Loading…
Reference in New Issue
Block a user