summaryrefslogtreecommitdiffstats
path: root/suz
blob: 14c6f057ed404e8fc3b53e99270d1f52150ad35e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/zsh
#set -x
CBROWSER="luakit"
#exec &>/dev/null

isurl () {
         url="[email protected]"
         curl -I -s "$url" &>/dev/null || return 1
         return 0
}


if [[ -z $1 ]]
then
	ARG="$(xsel -o)"
	isurl "$ARG" && ($CBROWSER $ARG) && exit
	$CBROWSER "http://www.google.com/search?q=$ARG"
	exit
fi

isurl "$ARG" && ($CBROWSER $1) && exit

case "$1" in
g) 
shift;URL="http://www.google.com/[email protected]";;
aur)
shift;URL="http://aur.archlinux.org/packages.php?O=0&L=0&C=0&[email protected]&SeB=nd&SB=n&SO=a&PP=25&do_Search=Go";;
w)
shift;URL="http://en.wikipedia.org/w/index.php?title=Special%3ASearch&[email protected]&go=Go";;
ar)
shift;URL="http://www.archlinux.org/packages/[email protected]";;
dic)
shift;URL="http://dictionary.reference.com/[email protected]&search=search";;
pb)
shift;URL="http://thepiratebay.org/s/[email protected]&page=0&orderby=99";;
tw)
shift;URL="http://search.twitter.com/[email protected]";;
im)
shift;URL="http://www.imdb.com/find?s=all&[email protected]&x=0&y=0";;
afs)
shift;URL="http://bbs.archlinux.org/search.php?action=search&[email protected]&author=&forum=-1&search_in=all&sort_by=0&sort_dir=DESC&show_as=topics&search=Submit"
;;
yt)
shift;URL="http://www.youtube.com/results?search_type=&[email protected]&aq=f";;
aw)
shift;URL="http://wiki.archlinux.org/index.php/Special:[email protected]&go=Go";;
flip)
shift;URL="http://www.flipkart.com/[email protected]&x=0&y=0";;
dem)
shift;URL="http://www.demonoid.com/files/[email protected]";;
ety)
shift;URL="http://www.etymonline.com/[email protected]&searchmode=none";;
mnova)
shift;URL="http://www.mininova.org/search/[email protected]&cat=0"
;;
lxr)
shift;URL="http://lxr.linux.no/linux+v2.6.36.0/+search";;
whois)
shift;URL="http://www.domaintools.com/go/?service=whois&[email protected]";;
wolf)
shift;URL="http://www.wolframalpha.com/input/[email protected]";;
*) URL="http://www.google.com/[email protected]"
esac

$CBROWSER "$URL" &>/dev/null
#set +x