diff options
Diffstat (limited to 'config/uzbl/scripts/gowikio.pl')
-rwxr-xr-x | config/uzbl/scripts/gowikio.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config/uzbl/scripts/gowikio.pl b/config/uzbl/scripts/gowikio.pl new file mode 100755 index 0000000..743c69c --- /dev/null +++ b/config/uzbl/scripts/gowikio.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://en.wikipedia.org/w/index.php?search=@ARGV" >> $fifo); +} +else +{ + qx(echo "uri @cmd" >> $fifo); +} |