28 lines
543 B
Bash
Executable File
28 lines
543 B
Bash
Executable File
#!/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
|
|
qutebrwoser ":open -w $url"
|
|
else
|
|
exit
|
|
fi
|
|
}
|
|
|
|
main
|
|
|
|
exit 0
|