summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--ranger/gui/color.py18
2 files changed, 17 insertions, 2 deletions
diff --git a/TODO b/TODO
index b3475548..baae6763 100644
--- a/TODO
+++ b/TODO
@@ -35,3 +35,4 @@ Bugs
 Ideas
 
    ( ) #20  10/01/01  use inotify to monitor filesystem changes
+   ( ) #24  10/01/06  progress bar
diff --git a/ranger/gui/color.py b/ranger/gui/color.py
index 1318ab6f..bf80929a 100644
--- a/ranger/gui/color.py
+++ b/ranger/gui/color.py
@@ -1,10 +1,24 @@
-"""Contains abbreviations to curses' color/attribute constants."""
+"""
+Contains abbreviations to curses color/attribute constants.
+
+Multiple attributes can be combined with the | (or) operator, toggled
+with ^ (xor) and checked for with & (and). Examples:
+
+attr = bold | underline
+attr |= reverse
+bool(attr & reverse) # => True
+attr ^= reverse
+bool(attr & reverse) # => False
+"""
+
 import curses
 
 COLOR_PAIRS = {10: 0}
 
 def get_color(fg, bg):
-	"""Returns the color pair for the given fg/bg combination."""
+	"""
+	Returns the curses color pair for the given fg/bg combination.
+	"""
 
 	c = bg+2 + 9*(fg + 2)