]> git.armaanb.net Git - bin.git/blob - dweb
xsel: new script
[bin.git] / dweb
1 #!/usr/bin/env sh
2
3 engine="https://duckduckgo.com?q="
4
5 case "$1" in
6                 uri)
7                                 :| dmenu -p "Open a URL:" | xargs -I % chromium "%"
8                                 ;;
9                 search)
10                                 :| dmenu -p "Search the web:" | xargs -I % chromium "$engine%"
11                                 ;;
12                 -h|--help|help)
13                                 echo "$0 [bookmark|help|search|uri]"
14                                 exit 0
15                                 ;;
16                 *)
17                                 echo "No such option. See \"$0 help\" for more information."
18                                 exit 1
19                                 ;;
20 esac
21
22 input=$(echo "$input" | tr -d '\n')
23