[rofi] Switch to firefox

This commit is contained in:
2021-08-20 09:46:56 -04:00
parent 25476f17bf
commit 12a7240b9d
3 changed files with 10 additions and 6 deletions

View File

@ -13,10 +13,10 @@
URL="https://search.unbl.ink/?q="
main() {
# Open rofi for prompt
query=$( rofi -dmenu -matching fuzzy -location 0 -p "Query > " )
query=$(rofi -dmenu -matching fuzzy -location 0 -p "Query > ")
if [[ -n "$query" ]]; then
url=$URL$query
/home/powellc/.asdf/shims/qutebrowser ":open -w $url"
firefox --new-window $url
else
exit
fi

View File

@ -55,8 +55,8 @@ urlencode() {
for ((i = 0; i < length; i++)); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c" ;;
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c" ;;
esac
done
}
@ -77,7 +77,7 @@ main() {
elif [[ $platform = 'ffsamlconf' ]]; then
firefox $URL
else
qutebrowser --target window $URL
firefox --new-window $URL
fi
else
exit

View File

@ -22,4 +22,8 @@ if [ "$URL" = "" ]; then
exit 0
fi
qutebrowser --target window "$URL"
if [[ "$URL" = http* ]]; then
firefox --new-window "$URL"
else
firefox --new-window --search "$URL"
fi