summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/colorschemes/default.py57
-rw-r--r--ranger/colorschemes/snow.py37
-rw-r--r--ranger/defaults/options.py2
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
 
f='#n64'>64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85