about summary refs log tree commit diff stats
path: root/code/keys.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-03 14:16:24 +0200
committerhut <hut@lavabit.com>2009-07-03 14:16:24 +0200
commit01104f4a929dbbf37366f40e5f45227304f3d7d6 (patch)
treecd62dff6e9015a396c0efa606603110fd30a3014 /code/keys.rb
parent2800fd920b9c400ba178c94c77ae77c999f28849 (diff)
downloadranger-01104f4a929dbbf37366f40e5f45227304f3d7d6.tar.gz
put options where they belong. in a config file
Diffstat (limited to 'code/keys.rb')
-rw-r--r--code/keys.rb31
1 files changed, 14 insertions, 17 deletions
diff --git a/code/keys.rb b/code/keys.rb
index 0498f6f6..b652ff92 100644
--- a/code/keys.rb
+++ b/code/keys.rb
@@ -134,8 +134,8 @@ module Fm
 			closei
 			system('clear')
 			ls = ['ls']
-			ls << '--color=auto' if OPTIONS['color']
-			ls << '--group-directories-first' if OPTIONS['color']
+			ls << '--color=auto' if Option.color
+			ls << '--group-directories-first' if Option.color
 			system(*ls)
 			system('bash')
 			@pwd.schedule
@@ -143,21 +143,21 @@ module Fm
 
 
 		when /^S(.)$/
-			OPTIONS['sort_reverse'] = $1.ord.between?(65, 90)
+			Option.sort_reverse = $1.ord.between?(65, 90)
 
 			case $1
 			when 'n'
-				OPTIONS['sort'] = :name
+				Option.sort = :name
 			when 'e'
-				OPTIONS['sort'] = :ext
+				Option.sort = :ext
 			when 't'
-				OPTIONS['sort'] = :type
+				Option.sort = :type
 			when 's'
-				OPTIONS['sort'] = :size
+				Option.sort = :size
 			when 'm'
-				OPTIONS['sort'] = :mtime
+				Option.sort = :mtime
 			when 'c'
-				OPTIONS['sort'] = :ctime
+				Option.sort = :ctime
 			end
 			@pwd.schedule
 
@@ -379,23 +379,20 @@ module Fm
 			end
 
 		when 'tw'
-			OPTIONS['wide_bar'] ^= true
+			Option.wide_bar ^= true
 
 		when 'tp'
-			OPTIONS['preview'] ^= true
-
-		when 'tc'
-			OPTIONS['color'] ^= true
+			Option.preview ^= true
 
 		when 'tf'
-			OPTIONS['filepreview'] ^= true
+			Option.file_preview ^= true
 
 		when 'th'
-			OPTIONS['hidden'] ^= true
+			Option.show_hidden ^= true
 			@pwd.refresh!
 
 		when 'td'
-			OPTIONS['dir_first'] ^= true
+			Option.dir_first ^= true
 			@pwd.schedule
 
 		when 'delete'