From 0f1df0db903ba576fd17b08197d3066af7a61e5f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Nov 2023 23:23:40 +0100 Subject: A lot of changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dmenu/plumb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dmenu/plumb') diff --git a/dmenu/plumb b/dmenu/plumb index 13cfca8..c0d98f3 100755 --- a/dmenu/plumb +++ b/dmenu/plumb @@ -90,7 +90,11 @@ functions="$functions duckduckgo" duckduckgo () { exec $WEB_BROWSER "https://duckduckgo.com/?q=$sel"; } +# TODO add other search engines +if (( $(printf '%s' "$sel" | wc -m) > 100 )); then + sel='selected text' +fi function="$(printf '%s\n' $functions | dmenu -i -p "Plumb $sel to:" -l 50)" if test -n "$function"; then -- cgit v1.2.3-70-g09d2