aboutsummaryrefslogtreecommitdiffstats
path: root/_config/openbox/scripts/pipemenu-places
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-01-10 00:14:08 +0800
committerAaron LI <aaronly.me@gmail.com>2016-01-10 00:16:37 +0800
commiteb1cbb009dd8f98eb71db6ff00f741d5329465ee (patch)
tree3fdd158b108deea530cdebe21b11737bc9de6c19 /_config/openbox/scripts/pipemenu-places
parent17c23577b823bced60ff0673d31611a1c7738fdd (diff)
downloaddotfiles-eb1cbb009dd8f98eb71db6ff00f741d5329465ee.tar.bz2
Add quake-like urxvt to openbox
* `urxvtc.sh`, `urxvtq.sh`: quake-like urxvt terminal * fix error application launch in rc.xml and menu.xml * add suffix to scripts
Diffstat (limited to '_config/openbox/scripts/pipemenu-places')
-rwxr-xr-x_config/openbox/scripts/pipemenu-places102
1 files changed, 0 insertions, 102 deletions
diff --git a/_config/openbox/scripts/pipemenu-places b/_config/openbox/scripts/pipemenu-places
deleted file mode 100755
index 812eb27..0000000
--- a/_config/openbox/scripts/pipemenu-places
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/env perl
-# Recursively browse filesystem through openbox3 pipe menus
-#### Usage: add
-# <menu id="browse" label="Browse" execute="obpipemenu-places ~" />
-# 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 "<openbox_pipe_menu>\n";
-
- # "Browse here..." lauches this dir
- print "<item label=\"Browse here..\">".
- "\n\t<action name=\"Execute\">".
- "\n\t\t<execute>$cmd '$path'</execute>".
- "\n\t</action>".
- "\n</item>\n".
- "<separator />";
-
- foreach $_ (@files) {
- my $length = length $_;
- my $last_c = substr $_, $length - 1, 1;
-
- if ($last_c eq "/") {
- print mk_dir_element($path, substr $_, 0, $length - 1);
- } elsif ($last_c eq "@") {
- print mk_sym_element($path, substr $_, 0, $length - 1);
- } else {
- print mk_file_element($path, $_);
- }
- }
- print "</openbox_pipe_menu>\n";
-}
-
-sub mk_dir_element {
- my ($path, $name) = @_;
- # escape ampersand and space in pathnames
- $path =~ s/&/&amp;/g;
- $name =~ s/&/&amp;/g;
- $path =~ s/ /\\ /g;
- $name =~ s/ /\\ /g;
-
- return "<menu id=\"$path/$name\" label=\"$name\" execute=\"$0 $path/$name\" />\n";
-}
-
-sub mk_sym_element {
- my ($path, $name) = @_;
- # escape ampersand in pathnames
- $path =~ s/&/&amp;/g;
- $name =~ s/&/&amp;/g;
-
- # Follow symlinks instead of opening links in rox.
- return "<menu id=\"$path/$name\" label=\"$name\" execute=\"$0 $path/$name\" />\n";
-=cut
- return "<item label=\"$name\">".
- "\n\t<action name=\"Execute\">".
- "\n\t\t<execute>$cmd '$path/$name'</execute>".
- "\n\t</action>"
- . "\n</item>\n";
-=cut
-}
-
-sub mk_file_element {
- my ($path, $name) = @_;
- my $label = $name;
- # escape ampersand in pathnames
- $path =~ s/&/&amp;/g;
- $name =~ s/&/&amp;/g;
-
- return "<item label=\"$name\">".
- "\n\t<action name=\"Execute\">".
- "\n\t\t<execute>$cmd '$path/$name'</execute>".
- "\n\t</action>"
- . "\n</item>\n";
-}
-