From 18ca6dae6c336f08fe052c9516279f323d2bb9f7 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Tue, 15 Jun 2021 15:18:58 +0200 Subject: [PATCH] switched to ddg until luke fixes 502 --- .local/bin/tools/searx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.local/bin/tools/searx b/.local/bin/tools/searx index e4dfe1b..f624f56 100755 --- a/.local/bin/tools/searx +++ b/.local/bin/tools/searx @@ -3,6 +3,8 @@ # Without input, will open DuckDuckGo.com. # URLs will be directly handed to the browser. # Anything else, it search it. +mainpage="https://duckduckgo.com" +searchpage="https://duckduckgo.com/?q=%s" browser=${BROWSER:-firefox} if [ -z "$(xclip -o -selection clipboard)" ]; then @@ -12,7 +14,7 @@ else fi if [ "$choice" = "🔍" ]; then - $browser "https://searx.cedars.xyz" + $browser "$mainpage" elif [ "$choice" = "📋" ]; then $browser "$(xclip -o -selection clipboard)" else @@ -20,6 +22,6 @@ else $browser "$choice" else string="$(echo $choice | sed 's/\ /+/g')" - $browser "https://searx.cedars.xyz/?q=$string&t=ffab&atb=v1-1" + $browser "$(echo "${searchpage}" | sed "s/%s/$string/")" fi fi