19 lines
371 B
Bash
Executable File
19 lines
371 B
Bash
Executable File
|
|
#!/bin/bash
|
|
action=$(echo close | rofi -dmenu -p "Google: ")
|
|
|
|
search () {
|
|
query=$1
|
|
index=$2
|
|
|
|
sel=$(printf "$(googler -n 15 -s $2 --json $1 | jq '.[].url' | sed -e 's/^"//' -e 's/"$//')\nMore\n" | rofi -dmenu)
|
|
|
|
case $sel in
|
|
"") exit ;;
|
|
"More") search $query $(expr $index + 15) ;;
|
|
*) google-chrome-stable --new-tab $sel ;;
|
|
esac
|
|
}
|
|
|
|
search $action 0
|