diff options
author | toonn <toonn@toonn.io> | 2018-09-07 20:03:16 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2018-09-07 22:39:50 +0200 |
commit | 18d424138fbf1e58b03786bb61a18c9951f0fe7c (patch) | |
tree | b31540d6802e9c8bfb0f71dd7838bd972e48d5b0 | |
parent | 4237ce33d7b7bb95bc0ed3536bb5e4fc1b9c8325 (diff) | |
download | ranger-18d424138fbf1e58b03786bb61a18c9951f0fe7c.tar.gz |
Restore the use of the bold attribute
Brightness by itself is not always clear so in terminals that actually support boldface it can help to differentiate. Bright black can be hard to differentiate from white, this is the case in kitty's default colorscheme. It's still better than the bold black because while that was easily differentiated from white it was very hard to see.
-rw-r--r-- | ranger/colorschemes/default.py | 14 | ||||
-rw-r--r-- | ranger/colorschemes/snow.py | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ranger/colorschemes/default.py b/ranger/colorschemes/default.py index 63f6f8c3..e9c42513 100644 --- a/ranger/colorschemes/default.py +++ b/ranger/colorschemes/default.py @@ -37,29 +37,35 @@ class Default(ColorScheme): if context.container: fg = red if context.directory: + attr |= bold fg = blue fg += BRIGHT elif context.executable and not \ any((context.media, context.container, context.fifo, context.socket)): + attr |= bold fg = green fg += BRIGHT if context.socket: + attr |= bold fg = magenta fg += BRIGHT if context.fifo or context.device: fg = yellow if context.device: + attr |= bold fg += BRIGHT if context.link: fg = cyan if context.good else magenta if context.tag_marker and not context.selected: + attr |= bold if fg in (red, magenta): fg = white else: fg = red fg += BRIGHT if not context.selected and (context.cut or context.copied): + attr |= bold fg = black fg += BRIGHT # If the terminal doesn't support bright colors, use dim white @@ -69,8 +75,10 @@ class Default(ColorScheme): fg = white if context.main_column: if context.selected: + attr |= bold fg += BRIGHT if context.marked: + attr |= bold fg = yellow fg += BRIGHT if context.badinfo: @@ -92,6 +100,7 @@ class Default(ColorScheme): bg = green elif context.link: fg = cyan + attr |= bold fg += BRIGHT elif context.in_statusbar: @@ -101,15 +110,16 @@ class Default(ColorScheme): elif context.bad: fg = magenta if context.marked: - attr |= reverse + attr |= bold | reverse fg = yellow fg += BRIGHT if context.frozen: - attr |= reverse + attr |= bold | reverse fg = cyan fg += BRIGHT if context.message: if context.bad: + attr |= bold fg = red fg += BRIGHT if context.loaded: diff --git a/ranger/colorschemes/snow.py b/ranger/colorschemes/snow.py index 0370e46a..c5f23c1c 100644 --- a/ranger/colorschemes/snow.py +++ b/ranger/colorschemes/snow.py @@ -4,7 +4,7 @@ from __future__ import (absolute_import, division, print_function) from ranger.gui.colorscheme import ColorScheme -from ranger.gui.color import default_colors, reverse, BRIGHT +from ranger.gui.color import default_colors, reverse, bold, BRIGHT class Snow(ColorScheme): @@ -19,6 +19,7 @@ class Snow(ColorScheme): if context.selected: attr = reverse if context.directory: + attr |= bold fg += BRIGHT elif context.highlight: @@ -35,6 +36,7 @@ class Snow(ColorScheme): elif context.in_taskview: if context.selected: + attr |= bold fg += BRIGHT if context.loaded: attr |= reverse |