summaryrefslogtreecommitdiffstats
path: root/suz
authorRaghavendra D Prabhu <[email protected]>2011-03-12 18:54:47 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-03-12 18:54:47 (GMT)
commit5ec75ea891c9b44cdd2d7a3e0c29b4d08dff2b2a (patch) (side-by-side diff)
treedeabb15393558ab3a1a629fc0782d8b0c3124c48 /suz
downloadScripts-5ec75ea891c9b44cdd2d7a3e0c29b4d08dff2b2a.zip
Scripts-5ec75ea891c9b44cdd2d7a3e0c29b4d08dff2b2a.tar.gz
Scripts-5ec75ea891c9b44cdd2d7a3e0c29b4d08dff2b2a.tar.bz2
Initial scripts update
Diffstat (limited to 'suz') (more/less context) (ignore whitespace changes)
-rwxr-xr-xsuz66
1 files changed, 66 insertions, 0 deletions
diff --git a/suz b/suz
new file mode 100755
index 0000000..14c6f05
--- a/dev/null
+++ b/suz
@@ -0,0 +1,66 @@
+#!/bin/zsh
+#set -x
+CBROWSER="luakit"
+#exec &>/dev/null
+
+isurl () {
+ 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