summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-10-21 19:39:09 +0200
committerhut <hut@lepus.uberspace.de>2014-10-21 19:39:09 +0200
commit48b7de52def66f92fc4caab309e313b71033e5ea (patch)
treeb43426d43e52a2c74ea2d9b7205c7b6a5d095cb5
parent88231762605b685704bb8f38eb7c70d2d83a79fa (diff)
parente2bf284de6e446d0cb9b353dd222d996ab238663 (diff)
downloadranger-48b7de52def66f92fc4caab309e313b71033e5ea.tar.gz
Merge branch 'selection_in_titlebar' of https://github.com/Klinkenstecker/ranger
-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):