summary refs log tree commit diff stats
path: root/doc/pydoc/ranger.defaults.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/pydoc/ranger.defaults.html')
0 files changed, 0 insertions, 0 deletions
anger/commit/ranger.rb?h=v0.2.6&id=9fa805cb490a666c813c7b2371728b5839976ad5'>9fa805cb ^
72c3a902 ^
41fddc99 ^

34bfb32e ^
a0de7f95 ^

ad97002e ^
a0de7f95 ^
34bfb32e ^



a0de7f95 ^




34bfb32e ^



8a6f5eab ^

72c3a902 ^
a0de7f95 ^
01104f4a ^





27ebfe63 ^
01104f4a ^
f8634dd6 ^
01104f4a ^









01104f4a ^
2887ca25 ^
7fe51696 ^
34bfb32e ^
adfea091
8a6f5eab ^
40c86e8c ^
8a6f5eab ^

bd627dc4 ^








7fe51696 ^


34bfb32e ^




a0de7f95 ^

8a6f5eab ^
2887ca25 ^
adfea091
27ebfe63 ^

a0de7f95 ^
34bfb32e ^





adfea091
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
                   
                 
 
                  
                                                       
 

            
                

                       
                                                      
           



                              




                                



                 

                                            
   
 





                               
                                     
                             
                            









                                               
                                                     
                                
 
             
 
                                 
                                        

                           








                                                 


                                        




                            

                      
                              
               
 

                                     
                                





                                            
 
#!/usr/bin/ruby -Ku
version = '0.2.4'

require 'pathname'
$: << MYDIR = File.dirname(Pathname(__FILE__).realpath)

EVIL = false

if ARGV.size > 0
	case ARGV.first
	when '-k'
		exec "killall -9 #{File.basename($0)}"
	end
	pwd = ARGV.first
	if pwd =~ /^file:\/\//
		pwd = $'
	end

	unless File.exists?(pwd)
		pwd = nil
	end

else
	pwd = nil
end

for file in Dir.glob "#{MYDIR}/code/**/*.rb"
	require file [MYDIR.size + 1 ... -3]
end

## default options
opt = {
	:show_hidden => false,
	:sort => :name,
	:dir_first => true,
	:sort_reverse => false,
	:cd => ARGV.include?('--cd'),
	:colorscheme => true,
	:ascii_only => true,
	:wide_bar => true,
	:file_preview => true,
	:preview => true,
	:colorscheme => 'default'
}

Option = Struct.new(*opt.keys).new(*opt.values)
opt = nil

load 'ranger.conf'
load 'data/colorscheme/' + Option.colorscheme + '.rb'
load 'data/screensaver/clock.rb'

include Debug

Debug.setup( :name   => 'nyuron',
             :file   => '/tmp/errorlog',
             :level  => 3 )

if pwd and !ARGV.empty? and !File.directory?(pwd)
	file = Directory::Entry.new(pwd)
	file.get_data
	Action.run(RunContext.new(file, 0, 'c'))
	exit
end

include CLI

Signal.trap(Scheduler::UPDATE_SIGNAL) do
	Fm.refresh
end

begin
	Fm.initialize( pwd )
	Fm.main_loop
ensure
	log "exiting!"
	log ""
	closei if CLI.running?
	Fm.dump

	Fm.dump_pwd_to_3 if Option.cd

	# Kill all other threads
	for thr in Thread.list
		unless thr == Thread.current
			thr.kill
		end
	end
end