dot/scripts/websearch

15 lines
264 B
Text
Raw Normal View History

2021-10-09 21:20:41 +00:00
#!/bin/sh
SEARCH_ENGINE="https://search.brave.com/search?q="
SEARCH_HISTORY=/tmp/.search_history
SEARCH=$(cat $SEARCH_HISTORY | dmenu -p "search")
touch $SEARCH_HISTORY
cat <<< "$SEARCH
$(cat $SEARCH_HISTORY)" > $SEARCH_HISTORY
brave "$SEARCH_ENGINE$SEARCH"