diff options
author | Urbain Vaes <urbain@vaes.uk> | 2015-08-08 20:08:42 +0200 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2015-08-08 20:08:42 +0200 |
commit | 8df9472e0cdbab0d12211c2bc77918e8f515c409 (patch) | |
tree | f420b705adfec42bb33191c44c8fe252fca0f785 /.uzbl/scripts | |
parent | b8a9b07b741cddbf6e0476e70c94aa186d62b6ae (diff) |
Improve installation and organization
Diffstat (limited to '.uzbl/scripts')
-rwxr-xr-x | .uzbl/scripts/goup.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.uzbl/scripts/goup.pl b/.uzbl/scripts/goup.pl new file mode 100755 index 0000000..f7ae275 --- /dev/null +++ b/.uzbl/scripts/goup.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +my ($config,$pid,$xid,$fifo,$socket,$url,$title,$cmd) = @ARGV; +if($fifo eq "") { die "No fifo"; }; + +# Delete last slash +chop($url); + +my $index = index(reverse($url), '/'); + +# if youre already on top of the directory structure +if ($index == -1) +{ + print $url; + exit; +} + +# Workaround for missing reverse index +$url = (substr(reverse($url), $index, length($url) )); +$url = reverse($url); +print $url."\n"; + +# This could look prettier with native fifo access +qx(echo "act uri $url" >> $fifo); |