Fix opening qutebrowser with search results in rofi

This commit is contained in:
Colin Powell
2019-12-06 14:36:50 -05:00
parent 6b40697d1d
commit 24472e64f9
3 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Requirements:
# rofi
# Description:
# Use rofi to search the web.
# Usage:
# searx-search.sh
# -----------------------------------------------------------------------------
# Script:
URL="https://search.unbl.ink/?q="
main() {
# Open rofi for prompt
query=$( rofi -dmenu -matching fuzzy -location 0 -p "Query > " )
if [[ -n "$query" ]]; then
url=$URL$query
xdg-open "$url"
else
exit
fi
}
main
exit 0