diff options
author | hut <hut@lavabit.com> | 2009-06-15 20:16:42 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-15 20:16:42 +0200 |
commit | 63bec7fe2632004f02503dc1d782293bbaf99471 (patch) | |
tree | 1d8543380003609f54ba12eb44e800bb0cc21f57 /data | |
parent | 896ec4b5748be400505eb01e13eb377702a077f9 (diff) | |
download | ranger-63bec7fe2632004f02503dc1d782293bbaf99471.tar.gz |
added a couple of new application definitions
Diffstat (limited to 'data')
-rw-r--r-- | data/apps.rb | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/data/apps.rb b/data/apps.rb index 112dbf60..a1db1da7 100644 --- a/data/apps.rb +++ b/data/apps.rb @@ -1,9 +1,14 @@ module Application + def aunpack(rc) + case rc.mode + when 0; "aunpack #{~rc}" + when 1; "aunpack -l #{~rc} | less" + end + end + def mplayer(rc) check rc - rc.base_flags = 'd' - # if rc.no_mode? # rc.mode = (rc.name =~ /720p/) ? 2 : 1 # end @@ -15,6 +20,11 @@ module Application else nil end end + def mplayer_detached(rc) + rc.base_flags = 'd' + mplayer(rc) + end + def evince(rc) check rc "evince #{~rc}" @@ -35,7 +45,7 @@ module Application def interpreted_language(rc) check rc case rc.mode - when 1; rc.first.executable? ? "#{rc.one}" : nil + when 1; run(rc) when 0; vi(rc) else nil end end @@ -45,6 +55,18 @@ module Application "zsnes #{~rc.first}" end + def run(rc) + rc.first.executable? ? "#{rc.one}" : nil + end + + def vi_or_run(rc) + check rc + case rc.mode + when 1; run(rc) + when 0; vi(rc) + else nil end + end + def vi(rc) check rc commands = [ |