about summary refs log tree commit diff stats
path: root/data/apps.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-06-18 01:56:01 +0200
committerhut <hut@lavabit.com>2009-06-18 01:56:01 +0200
commit9097b81b515f05c5e0e3eb76b6c51f2f374dc23a (patch)
tree0d1495c516544dc4f2a55024fc557b5e862d9fb9 /data/apps.rb
parentc747b1f7d103018291d83a03eec29a9ad3e54ed6 (diff)
downloadranger-9097b81b515f05c5e0e3eb76b6c51f2f374dc23a.tar.gz
more comments
Diffstat (limited to 'data/apps.rb')
-rw-r--r--data/apps.rb45
1 files changed, 38 insertions, 7 deletions
diff --git a/data/apps.rb b/data/apps.rb
index 9c300f56..18856262 100644
--- a/data/apps.rb
+++ b/data/apps.rb
@@ -1,4 +1,42 @@
+## This file defines programs, and HOW those
+## programs are run.
+##
+## Look at the definition of "totem" for a
+## fully documented example.
+
+
 module Application
+
+	## def totem(files) starts the definition of totem
+	def totem(files)
+		## this is the `case' statement.
+		## it looks up the mode and does different
+		## things depending on the mode.
+		case files.mode
+
+		## if the mode is 0 (default)
+		when 0
+			## start totem in fullscreen
+			"totem --fullscreen #{files}"
+
+		## if the mode is 1
+		when 1
+			## start totem normally
+			"totem #{files}"
+		end
+
+		## the mode is a number which you type in
+		## between two r's. for example, press:
+		## r1r
+		## to run the file in mode 1.
+		## there are shortcuts: the key l runs in mode 0,
+		## and L in mode 1.
+
+		## the variable `files' is of a type RunContext,
+		## see ranger/code/runcontext.rb for details.
+	end
+
+
 	def aunpack(files)
 		case files.mode
 		when 0; "aunpack #{files}"
@@ -10,13 +48,6 @@ module Application
 		"gedit #{files}"
 	end
 
-	def totem(files)
-		case files.mode
-		when 0; "totem --fullscreen #{files}"
-		when 1; "totem #{files}"
-		end
-	end
-
 	def mplayer(files)
 		case files.mode
 		when 0; "mplayer -fs -sid 0 #{files}"
ic form) of :reply' href='/akspecs/aerc/commit/go.mod?h=0.5.2&id=475b697bdfd7a5821282174f14f8d904e47aff4d'>475b697 ^
28021ed ^

b0bf09b ^
513e8aa ^
16c3f0a ^
072bc26 ^
8d20e92 ^
43dba93 ^
072bc26 ^
3836d24 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29