#!/usr/bin/env perl # Recursively browse filesystem through openbox3 pipe menus #### Usage: add #
# to your .config/openbox/menu.xml #### CAVEAT #### # This script was hacked on exclusively in stints between the hours of # 4 and 5 in the morning. Quality may have suffered. #### # Script by dircha from ob list on 05/17/04 # suggested improvements by John Russell on 05/17/04 implemented # a year later by Kacper Wysocki. # 05/30/05 - Kacper Wysocki # - opens files with 'rox', which launches appropriate file handler # - hidden directories now stay hidden # - spaces, ampersands in dir- and filenames are escaped # - newlines at each entry to make output a little readable # 06/04/05 - Kacper Wysocki # - use $0 for scriptname # - use $ENV{'HOME'} as default path # - now follows symlinks use strict; # Command to lauch files with my $cmd = "thunar"; my $path = $ARGV[0]; $path = "$ENV{'HOME'}" if $path eq ""; my @files = split /\n/, `ls -1p '$path'`; mk_menu_element($path, @files); sub mk_menu_element { my ($path, @files) = @_; print "