about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/fsobject.py2
-rw-r--r--ranger/core/actions.py4
-rw-r--r--ranger/gui/widgets/browsercolumn.py21
3 files changed, 17 insertions, 10 deletions
diff --git a/ranger/container/fsobject.py b/ranger/container/fsobject.py
index 59aea478..fb3356a4 100644
--- a/ranger/container/fsobject.py
+++ b/ranger/container/fsobject.py
@@ -82,7 +82,7 @@ class FileSystemObject(FileManagerAware, SettingsAware):
 
     basename_is_rel = False
 
-    # the line mode may be "filename", "details" or "title"
+    # the line mode may be "filename", "permissions" or "title"
     _linemode = "filename"
 
     def __init__(self, path, preload=None, path_is_abs=False, basename_is_rel=False):
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index f3f1f04c..4d9d4121 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -155,12 +155,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
         """
         Change what is displayed as a filename.
 
-        "mode" may be: "filename", "details", "title"
+        "mode" may be: "filename", "permissions", "title"
         "directory" specifies the directory. None means the current directory
         "depth" specifies the recursion depth
         """
 
-        assert mode in ("filename", "details", "title")
+        assert mode in ("filename", "permissions", "title")
 
         if directory is None:
             directory = self.fm.thisdir
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 0edb9c8d..9e177a52 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -250,14 +250,20 @@ class BrowserColumn(Pager):
 
             key = (self.wid, selected_i == i, drawn.marked, self.main_column,
                     drawn.path in copied, tagged_marker, drawn.infostring,
-                    drawn.vcsfilestatus, drawn.vcsremotestatus, self.fm.do_cut)
+                    drawn.vcsfilestatus, drawn.vcsremotestatus, self.fm.do_cut,
+                    drawn._linemode)
 
             if key in drawn.display_data:
                 self.execute_curses_batch(line, drawn.display_data[key])
                 self.color_reset()
                 continue
 
-            text = drawn.basename
+            if drawn._linemode == "filename":
+                text = drawn.basename
+            elif drawn._linemode == "permissions":
+                text = "%s %s %s %s" % (drawn.get_permission_string(),
+                        drawn.user, drawn.group, drawn.basename)
+
             if drawn.marked and (self.main_column or \
                     self.settings.display_tags_in_all_columns):
                 text = " " + text
@@ -285,11 +291,12 @@ class BrowserColumn(Pager):
                 space -= vcsstringlen
 
             # info string
-            infostring = self._draw_infostring_display(drawn, space)
-            infostringlen = self._total_len(infostring)
-            if space - infostringlen > 2:
-                predisplay_right = infostring + predisplay_right
-                space -= infostringlen
+            if drawn._linemode == "filename":
+                infostring = self._draw_infostring_display(drawn, space)
+                infostringlen = self._total_len(infostring)
+                if space - infostringlen > 2:
+                    predisplay_right = infostring + predisplay_right
+                    space -= infostringlen
 
             textstring = self._draw_text_display(text, space)
             textstringlen = self._total_len(textstring)