[openbox] Recursive filesystem browsing pipe menu, revisited.

Neil Bird neil at fnxweb.com
Wed Jun 8 06:29:37 EDT 2005


Around about 02/06/05 17:30, mfitzgib typed ...
> I thought I'd post another script up here that does pretty much the same 
> thing, but this one incorporates mime types...

   This is the one I use.  I recommend adding at 110:

$dir =~ s/\$(\w+)/$ENV{$1}/;

   (cope with, e.g., $HOME as an arg.)


> #i just want the label to be the file name without the dir, so make a new label, nixing the path
> my $i = length($file) - 1;
> while ($i != 0 && substr($file,$i,1) ne "/") {--$i;}
> my $newlabel = substr($file,$i,length($file) - $i);

   Or:

                 @chunks = split /\//, $file;
                 $last = $chunks[$#chunks];
		my $newlabel = string_protect($last);


   Now just need 'paging' for big dirs ...

-- 
[neil at fnx ~]# rm -f .signature
[neil at fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil at fnx ~]# exit



More information about the openbox mailing list