Notices where this attachment appears
-
@kirby
declare -A sources
sources[ddg]="https://duckduckgo.com/?q="
sources[gelb]="https://gelbooru.com/index.php?page=post&s=list&tags="
sources[wiki]="https://en.wikipedia.org/w/index.php?title=Special:Search&fulltext=Search&ns0=1&go=Go&search="
[etc.]
function smolhelp()
{
echo "Known search engines: ${!sources[@]}"
}
function bighelp()
{
echo "Configured search engines:"
for key in ${!sources[@]}; do
echo "$key: ${sources[$key]}"
done
}
while getopts "hH" o;do case "${o}" in
h) smolhelp; exit;;
H) bighelp; exit;;
esac done
SOURCE=$1
shift 1
exo-open "${sources[$SOURCE]}$*"
Default browser: xfce4-terminal --command="lynx %s"