summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@hut.pm>2019-04-01 20:36:14 +0200
committerhut <hut@hut.pm>2019-04-01 20:36:14 +0200
commit0bffe922cee451cba6c457dbf641bbcd3a12b64a (patch)
tree199c68dede2daaed6562e34a663172da6d86ac06
parentbf00980230e016283ce0c19702889ab727b7523f (diff)
downloadranger-0bffe922cee451cba6c457dbf641bbcd3a12b64a.tar.gz
A E S T H E T I C
-rw-r--r--ranger/colorschemes/aesthetic.py47
-rw-r--r--ranger/config/rc.conf2
2 files changed, 48 insertions, 1 deletions
diff --git a/ranger/colorschemes/aesthetic.py b/ranger/colorschemes/aesthetic.py
new file mode 100644
index 00000000..22a056e9
--- /dev/null
+++ b/ranger/colorschemes/aesthetic.py
@@ -0,0 +1,47 @@
+# This file is part of ranger, the console file manager.
+# License: GNU GPL version 3, see the file "AUTHORS" for details.
+
+from __future__ import (absolute_import, division, print_function)
+
+from ranger.colorschemes.default import Default
+from ranger.gui.color import bold, BRIGHT, reverse
+
+
+class Scheme(Default):
+    progress_bar_color = 166
+
+    def use(self, context):
+        fg, bg, attr = Default.use(self, context)
+
+        if context.directory and not context.marked and not context.link \
+                and not context.inactive_pane:
+            fg = 165
+
+        elif context.link:
+            fg = 122 if context.good or context.in_titlebar else 198
+
+        elif context.in_titlebar and context.hostname:
+            fg = 84
+
+        elif context.container:
+            fg = 162
+
+        elif context.media:
+            if context.image:
+                fg = 227
+            else:
+                fg = 174
+
+        elif context.executable and not \
+                any((context.media, context.container,
+                     context.fifo, context.socket, context.link)):
+            attr |= bold
+            fg = 47
+
+        if context.main_column:
+            if context.marked and not context.selected:
+                attr |= bold
+                attr |= reverse
+                fg = 214
+
+        return fg, bg, attr
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 4a182f69..e2e215fa 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -136,7 +136,7 @@ set show_hidden_bookmarks true
 
 # Which colorscheme to use?  These colorschemes are available by default:
 # default, jungle, snow, solarized
-set colorscheme default
+set colorscheme aesthetic
 
 # Preview files on the rightmost column?
 # And collapse (shrink) the last column if there is nothing to preview?