mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2023-02-13 20:55:19 -05:00
Added this dmenu script for using the surfraw CLI app.
This commit is contained in:
parent
cf50f99137
commit
ccb45c0cd3
1 changed files with 20 additions and 0 deletions
20
.dmenu/dmenu-surfraw.sh
Executable file
20
.dmenu/dmenu-surfraw.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
# ____ _____
|
||||
# | _ \_ _| Derek Taylor (DistroTube)
|
||||
# | | | || | http://www.youtube.com/c/DistroTube
|
||||
# | |_| || | http://www.gitlab.com/dwt1/
|
||||
# |____/ |_|
|
||||
#
|
||||
# Dmenu script for launching surfaw, a command line search utility.
|
||||
|
||||
cmd="dmenu -i"
|
||||
|
||||
while [ -z "$engine" ]; do
|
||||
engine=$(sr -elvi | gawk '{if (NR!=1) { print $1 }}' | $cmd -p "Search engine?") || exit
|
||||
done
|
||||
|
||||
while [ -z "$query" ]; do
|
||||
query=$(echo "" | $cmd -p "Searching $engine") || exit
|
||||
done
|
||||
|
||||
st -e sr "$engine" "$query"
|
Loading…
Reference in a new issue