summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/config/rc.conf3
-rw-r--r--ranger/container/settings.py1
-rw-r--r--ranger/gui/widgets/titlebar.py3
3 files changed, 6 insertions, 1 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 9e886e19..644706e8 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -166,6 +166,9 @@ set cd_bookmarks true
 # disable this feature.
 set preview_max_size 0
 
+# Add the highlighted file to the path in the titlebar
+set show_selection_in_titlebar true
+
 # ===================================================================
 # == Local Options
 # ===================================================================
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 90b6f7ce..0d8b6906 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -39,6 +39,7 @@ ALLOWED_SETTINGS = {
     'scroll_offset': int,
     'shorten_title': int,
     'show_cursor': bool,  # TODO: not working?
+    'show_selection_in_titlebar': bool,
     'show_hidden_bookmarks': bool,
     'show_hidden': bool,
     'sort_case_insensitive': bool,
diff --git a/ranger/gui/widgets/titlebar.py b/ranger/gui/widgets/titlebar.py
index 38a99a92..fa10a744 100644
--- a/ranger/gui/widgets/titlebar.py
+++ b/ranger/gui/widgets/titlebar.py
@@ -115,7 +115,8 @@ class TitleBar(Widget):
             bar.add(path.basename, clr, directory=path)
             bar.add('/', clr, fixed=True, directory=path)
 
-        if self.fm.thisfile is not None:
+        if self.fm.thisfile is not None and \
+                self.settings.show_selection_in_titlebar:
             bar.add(self.fm.thisfile.basename, 'file')
 
     def _get_right_part(self, bar):