.dotfiles/configs/wofi/web-search.sh

34 lines
757 B
Bash
Raw Normal View History

2021-11-28 16:19:50 +01:00
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Info:
# author: Miroslav Vidovic
# file: web-search.sh
# created: 24.02.2017.-08:59:54
# revision: ---
# version: 1.0
# -----------------------------------------------------------------------------
# Requirements:
# rofi
# Description:
# Use rofi to search the web.
# Usage:
# web-search.sh
# -----------------------------------------------------------------------------
# Script:
2022-04-15 14:52:17 +02:00
searx="https://xzx.ro/search?q="
2021-11-28 16:19:50 +01:00
startpage="https://www.startpage.com/sp/search?q="
query=$( wofi -d -p "Search: " -W 600 -H 100 -k ~/.cache/wofi-web)
if [[ -n "$query" ]]; then
2022-04-15 14:52:17 +02:00
url="$searx$query"
2021-11-28 16:19:50 +01:00
xdg-open "$url"
else
exit
fi
exit 0