Module: Rfd
- Defined in:
- lib/rfd.rb,
lib/rfd/item.rb,
lib/rfd/windows.rb,
lib/rfd/commands.rb
Defined Under Namespace
Modules: Commands Classes: CommandLineWindow, Controller, DebugWindow, HeaderLeftWindow, HeaderRightWindow, Item, MainWindow, Window
Constant Summary collapse
- VERSION =
Gem.loaded_specs['rfd'].version.to_s
Class Method Summary collapse
-
.init_curses ⇒ Object
:nodoc:.
-
.start(dir = '.') ⇒ Object
Start the app here!.
Class Method Details
.init_curses ⇒ Object
:nodoc:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rfd.rb', line 16 def self.init_curses Curses.init_screen Curses.raw Curses.noecho Curses.curs_set 0 Curses.stdscr.keypad = true Curses.start_color [Curses::COLOR_WHITE, Curses::COLOR_CYAN, Curses::COLOR_MAGENTA, Curses::COLOR_GREEN, Curses::COLOR_RED].each do |c| Curses.init_pair c, c, Curses::COLOR_BLACK end Curses.mousemask Curses::BUTTON1_CLICKED | Curses::BUTTON1_DOUBLE_CLICKED end |
.start(dir = '.') ⇒ Object
Start the app here!
Parameters
-
dir
- The initial directory.
35 36 37 38 39 40 41 42 43 |
# File 'lib/rfd.rb', line 35 def self.start(dir = '.') init_curses Rfd::Window.draw_borders Curses.stdscr.noutrefresh rfd = Rfd::Controller.new rfd.cd dir Curses.doupdate rfd end |