summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2015-03-30 19:12:19 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2015-03-30 21:44:25 +0200
commit453a282ed0d599174cc8f45ed13c54b1be1ea4f6 (patch)
tree5545c9bb17a31b2a856f9ebda9210c57c4056e70
parent83bb5b85c2fff3ca3fc9f36ee74f38e8550cfe0d (diff)
downloadranger-453a282ed0d599174cc8f45ed13c54b1be1ea4f6.tar.gz
:flat statusbar indicator added
-rw-r--r--ranger/gui/context.py2
-rw-r--r--ranger/gui/widgets/statusbar.py9
2 files changed, 9 insertions, 2 deletions
diff --git a/ranger/gui/context.py b/ranger/gui/context.py
index 2ad27434..e5aef06c 100644
--- a/ranger/gui/context.py
+++ b/ranger/gui/context.py
@@ -11,7 +11,7 @@ CONTEXT_KEYS = ['reset', 'error', 'badinfo',
         'good', 'bad',
         'space', 'permissions', 'owner', 'group', 'mtime', 'nlink',
         'scroll', 'all', 'bot', 'top', 'percentage', 'filter',
-        'marked', 'tagged', 'tag_marker', 'cut', 'copied',
+        'flat', 'marked', 'tagged', 'tag_marker', 'cut', 'copied',
         'help_markup', # COMPAT
         'seperator', 'key', 'special', 'border', # COMPAT
         'title', 'text', 'highlight', 'bars', 'quotes', 'tab', 'loaded',
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index 9ff331a0..f5824d99 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -242,8 +242,15 @@ class StatusBar(Widget):
         max_pos = len(target) - self.column.hei
         base = 'scroll'
 
+        right.add(" ", "space")
+
+        if self.fm.thisdir.flat:
+            right.add("flat=", base, 'flat')
+            right.add(str(self.fm.thisdir.flat), base, 'flat')
+            right.add(", ", "space")
+
         if self.fm.thisdir.filter:
-            right.add(" f=`", base, 'filter')
+            right.add("f=`", base, 'filter')
             right.add(self.fm.thisdir.filter.pattern, base, 'filter')
             right.add("', ", "space")
 
#n191'>191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232