summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKlinke600 <steffen.fuerst@gmx.de>2014-10-01 00:28:42 +0200
committerKlinkenstecker <klinkenstecker@gmx.de>2014-10-01 01:50:58 +0200
commite2bf284de6e446d0cb9b353dd222d996ab238663 (patch)
treef46fe4369e7bf6b96c10fb9bb15fee3b3bd32840
parent93654aa049863d2ef5534dbde09bd17cafd55584 (diff)
downloadranger-e2bf284de6e446d0cb9b353dd222d996ab238663.tar.gz
New show_selection_in_titlebar setting
-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):