diff options
-rw-r--r-- | ranger/colorschemes/default.py | 57 | ||||
-rw-r--r-- | ranger/colorschemes/snow.py | 37 | ||||
-rw-r--r-- | ranger/defaults/options.py | 2 |
3 files changed, 58 insertions, 38 deletions
diff --git a/ranger/colorschemes/default.py b/ranger/colorschemes/default.py new file mode 100644 index 00000000..ac54bf7f --- /dev/null +++ b/ranger/colorschemes/default.py @@ -0,0 +1,57 @@ +from ranger.gui.colorscheme import ColorScheme +from ranger.gui.color import * + +class Default(ColorScheme): + def use(self, context): + fg, bg, attr = default_colors + + if context.reset: + pass + + elif context.in_display: + if context.selected: + attr = reverse + else: + attr = normal + + if context.empty or context.error: + bg = red + + if context.media: + if context.image: + fg = yellow + else: + fg = magenta + + if context.container: + fg = red + + if context.document: + fg = default + + if context.directory: + fg = blue + + elif context.executable and not any((context.media, context.container, context.document)): + attr |= bold + fg = green + + if context.link: + fg = cyan + + if context.maindisplay and context.selected: + attr |= bold + + elif context.in_titlebar: + attr |= bold + + if context.hostname: + fg = green + + elif context.directory: + fg = blue + + elif context.link: + fg = cyan + + return fg, bg, attr diff --git a/ranger/colorschemes/snow.py b/ranger/colorschemes/snow.py index baad5e43..8e7da043 100644 --- a/ranger/colorschemes/snow.py +++ b/ranger/colorschemes/snow.py @@ -14,44 +14,7 @@ class Snow(ColorScheme): else: attr = normal - if context.empty or context.error: - bg = red - - if context.media: - if context.image: - fg = yellow - else: - fg = magenta - - if context.container: - fg = red - - if context.document: - fg = default - if context.directory: - fg = blue - - elif context.executable and not any((context.media, context.container, context.document)): - attr |= bold - fg = green - - if context.link: - fg = cyan - - if context.maindisplay and context.selected: attr |= bold - elif context.in_titlebar: - attr |= bold - - if context.hostname: - fg = green - - elif context.directory: - fg = blue - - elif context.link: - fg = cyan - return fg, bg, attr diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py index 8d44089f..d3eeef84 100644 --- a/ranger/defaults/options.py +++ b/ranger/defaults/options.py @@ -1,6 +1,6 @@ from ranger import colorschemes -colorscheme = colorschemes.snow +colorscheme = colorschemes.default show_hidden = False |