match emoji to search engine

This commit is contained in:
Alexander Bocken 2020-07-07 18:52:28 +02:00
parent f2ee676f6f
commit 39a897b1a4

View File

@ -7,9 +7,9 @@ browser=${BROWSER:-firefox}
pgrep -x dmenu && exit pgrep -x dmenu && exit
choice=$(echo "🦆" | dmenu -i -p "Searx:") || exit 1 choice=$(echo "🔍" | dmenu -i -p "Searx:") || exit 1
if [ "$choice" = "🦆" ]; then if [ "$choice" = "🔍" ]; then
$browser "https://searx.bocken.org" $browser "https://searx.bocken.org"
else else
if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then