about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-18 22:06:41 +0200
committerhut <hut@lavabit.com>2009-07-18 22:06:41 +0200
commit506e5aa40eb5f828b7d61db088e2de6c71d3a9b6 (patch)
tree74130dbd403d9badad5eda6c3475725064730827
parentf163bb3cbb71b5e759db9d335dd08e2f6fcd569d (diff)
downloadranger-506e5aa40eb5f828b7d61db088e2de6c71d3a9b6.tar.gz
restructured configuration file
-rw-r--r--ranger.conf50
-rwxr-xr-xranger.rb5
2 files changed, 45 insertions, 10 deletions
diff --git a/ranger.conf b/ranger.conf
index 45bf654d..b6aeaffd 100644
--- a/ranger.conf
+++ b/ranger.conf
@@ -1,9 +1,45 @@
-Option.show_hidden  = false
-Option.sort         = :name
-Option.sort_reverse = false
-Option.colorscheme  = 'default'
-Option.wide_bar     = true
-Option.file_preview = true
-Option.preview      = true
+# ranger configuration file
 
+##--------------------------------------------------
+# options are in this format: Option.<name> = <value>
+# if an option is not defined, the default value is used.
+# this file is treated as ruby code, text after # is ignored
+ 
+##--------------------------------------------------
+# should all non-ascii characters be replaced with stars?
+# use this if unicode is not supported by your OS/ruby/ncurses version
+Option.ascii_only     = true
+
+# how to sort? don't forget the column before the word.
+# :name   |  sort by name
+# :ext    |  sort by file extension
+# :type   |  sort by MIME type
+# :size   |  sort by file size
+# :ctime  |  sort by change time (of the filesystem inode)
+# :mtime  |  sort by modification time (of the content)
+Option.sort           = :name
+
+# display a wide bar in the current column?
+Option.wide_bar       = true
+
+# which colorscheme to use? colorschemes are in data/colorscheme/
+# by default, there are 'default' and 'mono'
+Option.colorscheme    = 'default'
+
+# ask for a confirmation before deleting things?
+Option.confirm_string = "yes I am!"
+Option.confirm        = true
+
+# these options are obvious
+Option.bookmark_file  = '~/.ranger_bookmarks'
+Option.show_hidden    = false
 Option.list_dir_first = true
+Option.sort_reverse   = false
+Option.mouse          = true
+Option.preview        = true
+Option.file_preview   = true
+
+##--------------------------------------------------
+# just ignore this:
+# ^\s:\(.*\)\s\{8}=>\(.*\),\?$/Option.\1=\2
+# vim: ft=ruby
diff --git a/ranger.rb b/ranger.rb
index fc74e012..441a3a82 100755
--- a/ranger.rb
+++ b/ranger.rb
@@ -37,8 +37,6 @@ opt = {
 	:sort                   => :name,
 	:list_dir_first         => true,
 	:sort_reverse           => false,
-	:cd                     => ARGV.include?('--cd'),
-	:colorscheme            => true,
 	:bookmark_file          => '~/.ranger_bookmarks',
 	:ascii_only             => true,
 	:wide_bar               => true,
@@ -47,7 +45,8 @@ opt = {
 	:file_preview           => true,
 	:preview                => true,
 	:mouse                  => true,
-	:colorscheme            => 'default'
+	:colorscheme            => 'default',
+	:cd                     => ARGV.include?('--cd'),
 }
 
 class OptionClass < Struct.new(*opt.keys)