about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--data/apps.rb28
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 = [