dot/scripts/websearch
2021-10-09 22:20:41 +01:00

14 lines
264 B
Bash
Executable file

#!/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"