diff options
author | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-02-12 19:45:58 +0100 |
---|---|---|
committer | Vasil Zlatanov <vasil.zlatanov@gmail.com> | 2015-02-12 19:45:58 +0100 |
commit | f7ac47a1102006842d074146237c756648478675 (patch) | |
tree | ebd106e074f56d94046fc06d7718b2fc31ea3386 /config/uzbl/scripts/goto.pl | |
parent | 504b3cc5d6cbc9ec66c5e89e3ecd4310c8dd5a69 (diff) | |
download | dotfiles-f7ac47a1102006842d074146237c756648478675.tar.gz dotfiles-f7ac47a1102006842d074146237c756648478675.tar.bz2 dotfiles-f7ac47a1102006842d074146237c756648478675.zip |
bspwm update
Diffstat (limited to 'config/uzbl/scripts/goto.pl')
-rwxr-xr-x | config/uzbl/scripts/goto.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config/uzbl/scripts/goto.pl b/config/uzbl/scripts/goto.pl new file mode 100755 index 0000000..ea7269e --- /dev/null +++ b/config/uzbl/scripts/goto.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +my @cmd = @ARGV; +my $fifo = $ENV{'UZBL_FIFO'}; + + +#If there are no dots in the first word or more than one word is suppllied expect a phrase for google. Else go to the uri specified. +if (index(@cmd[0], '.') == -1 || scalar @cmd > 1) +{ + # Replace this with your search engine + qx(echo "uri http://www.google.com/search?q=@ARGV" >> $fifo); +} +else +{ + qx(echo "uri @cmd" >> $fifo); +} |