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)
 
04964e11c90347'>^
480fd995 ^
16f2bd11 ^
c83dca9c ^


17623a62 ^
c83dca9c ^


17623a62 ^

c83dca9c ^



17623a62 ^



c83dca9c ^
17623a62 ^
c83dca9c ^



17623a62 ^
c83dca9c ^


17623a62 ^

c83dca9c ^
c83dca9c ^






















480fd995 ^




17623a62 ^
480fd995 ^








17623a62 ^
480fd995 ^
17623a62 ^












480fd995 ^







17623a62 ^
480fd995 ^
17623a62 ^
480fd995 ^

17623a62 ^
480fd995 ^

17623a62 ^

480fd995 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122