From 3f44e88d6e1df1ee07e7acb4935498855ecb22d3 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 16 Apr 2020 14:48:52 -0400 Subject: [PATCH] no longer embed dmenu to prevent error if dmenu has no alpha patch --- config.h | 2 +- st-urlhandler | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index 1d3a8a4..328e0f5 100644 --- a/config.h +++ b/config.h @@ -224,7 +224,7 @@ MouseKey mkeys[] = { static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler", "externalpipe", NULL }; 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 -w $(xdotool getactivewindow) -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard", + "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", "externalpipe", NULL }; static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL }; diff --git a/st-urlhandler b/st-urlhandler index a68c46c..5833883 100755 --- a/st-urlhandler +++ b/st-urlhandler @@ -10,6 +10,6 @@ urls="$(sed 's/.*│//g' | tr -d '\n' | [ -z "$urls" ] && exit -chosen="$(echo "$urls" | dmenu -w "$(xdotool getactivewindow)" -i -p 'Follow which url?' -l 10)" +chosen="$(echo "$urls" | dmenu -i -p 'Follow which url?' -l 10)" setsid xdg-open "$chosen" >/dev/null 2>&1 &