diff options
author | hut <hut@lavabit.com> | 2009-12-06 12:31:33 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-06 12:31:33 +0100 |
commit | 465bff736d234e57efb2e9232df8882f3fd3a5cb (patch) | |
tree | c36725fc98a1e63bfdbe694a96c71cb28d3708f4 /ranger/gui | |
parent | 4162b636289f065b056e180389456d9f30ee796c (diff) | |
download | ranger-465bff736d234e57efb2e9232df8882f3fd3a5cb.tar.gz |
changing implementation of options
Diffstat (limited to 'ranger/gui')
-rw-r--r-- | ranger/gui/colorscheme.py | 24 | ||||
-rw-r--r-- | ranger/gui/wconsole.py | 4 |
2 files changed, 25 insertions, 3 deletions
diff --git a/ranger/gui/colorscheme.py b/ranger/gui/colorscheme.py index d7833016..790112ec 100644 --- a/ranger/gui/colorscheme.py +++ b/ranger/gui/colorscheme.py @@ -8,7 +8,29 @@ CONTEXT_KEYS = [ 'reset', 'error', class ColorSchemeContext(): pass -class ColorScheme(): +# colorscheme specification: +# +# A colorscheme must... +# +# 1. be inside either of these directories: +# ~/.ranger/colorschemes/ +# path/to/ranger/colorschemes/ +# +# 2. be a subclass ofranger.gui.colorscheme.ColorScheme +# +# 3. have a use(self, context) method which returns a tuple of 3 integers. +# the first integer is the foreground color, the second is the background +# color, the third is the attribute, as specified by the curses module. +# +# +# define which colorscheme to use by having this to your options.py: +# from ranger import colorschemes +# colorscheme = colorschemes.filename +# +# If your colorscheme-file contains more than one colorscheme, specify it with: +# colorscheme = colorschemes.filename.classname + +class ColorScheme(object): def __init__(self): self.cache = {} diff --git a/ranger/gui/wconsole.py b/ranger/gui/wconsole.py index 611790f8..9078d781 100644 --- a/ranger/gui/wconsole.py +++ b/ranger/gui/wconsole.py @@ -7,12 +7,12 @@ CONSOLE_MODES_DICTIONARY = { '@': 'open with: ' } class WConsole(SuperClass): def __init__(self, win, colorscheme): from ranger.command import CommandList - from ranger.conf.keys import initialize_console_commands + from ranger.conf import keys SuperClass.__init__(self, win, colorscheme) self.mode = None self.visible = False self.commandlist = CommandList() - initialize_console_commands(self.commandlist) + keys.initialize_console_commands(self.commandlist) self.last_cursor_mode = 1 self.clear() self.prompt = None |