diff options
author | hut <hut@lavabit.com> | 2009-12-13 00:45:03 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-13 00:45:03 +0100 |
commit | 728fb8385d3a4dca994ae652ca44b9ffe72a029d (patch) | |
tree | 34f171ecbbcc4a03060738a53de45b75c7f25b60 /ranger/gui/colorscheme.py | |
parent | e657119b4881cec409f42b738f073f5b8e43bc2a (diff) | |
download | ranger-728fb8385d3a4dca994ae652ca44b9ffe72a029d.tar.gz |
added docstrings everywhere
Diffstat (limited to 'ranger/gui/colorscheme.py')
-rw-r--r-- | ranger/gui/colorscheme.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ranger/gui/colorscheme.py b/ranger/gui/colorscheme.py index 38f4ac5a..a69ed75b 100644 --- a/ranger/gui/colorscheme.py +++ b/ranger/gui/colorscheme.py @@ -35,6 +35,7 @@ class ColorScheme(object): self.cache = {} def get(self, *keys): + """Determine the (fg, bg, attr) tuple or get it from cache""" try: return self.cache[keys] @@ -50,6 +51,7 @@ class ColorScheme(object): return color def get_attr(self, *keys): + """Returns the curses attr integer for the specified keys""" from ranger.gui.color import get_color import curses @@ -58,5 +60,9 @@ class ColorScheme(object): def use(self, context): - return -1, -1, 0 + """Use the colorscheme to determine the (fg, bg, attr) tuple. +This is a dummy function which always returns default_colors. +Override this in your custom colorscheme!""" + from ranger.gui.color import default_colors + return default_colors |