about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/ranger.111
-rw-r--r--doc/ranger.pod8
-rw-r--r--examples/rc_emacs.conf8
-rw-r--r--ranger/config/rc.conf5
-rw-r--r--ranger/container/settings.py1
-rw-r--r--ranger/gui/ui.py19
6 files changed, 18 insertions, 34 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index a6e20b4c..84ef458f 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.9.2" "2019-10-02" "ranger manual"
+.TH RANGER 1 "ranger-1.9.2" "2019-12-22" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -1105,13 +1105,10 @@ a \s-1BIDI\s0 algorithm to reverse the relevant parts of the text.
 Requires the python-bidi pip package.
 .IP "update_title [bool]" 4
 .IX Item "update_title [bool]"
-Set a window title?
-.IP "update_icon_title [bool]" 4
-.IX Item "update_icon_title [bool]"
-Set an icon title?
+Set a window title? Updates both the \fI\s-1WM_NAME\s0\fR and \fI\s-1WM_ICON_NAME\s0\fR properties.
 .IP "update_tmux_title [bool]" 4
 .IX Item "update_tmux_title [bool]"
-Set the title to \*(L"ranger\*(R" in the tmux program?
+Set the tmux \fIwindow-name\fR to \*(L"ranger\*(R"?
 .IP "use_preview_script [bool] <zv>" 4
 .IX Item "use_preview_script [bool] <zv>"
 Use the preview script defined in the setting \fIpreview_script\fR?
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 852afcdc..fda1cbc6 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -1148,15 +1148,11 @@ Requires the python-bidi pip package.
 
 =item update_title [bool]
 
-Set a window title?
-
-=item update_icon_title [bool]
-
-Set an icon title?
+Set a window title? Updates both the I<WM_NAME> and I<WM_ICON_NAME> properties.
 
 =item update_tmux_title [bool]
 
-Set the title to "ranger" in the tmux program?
+Set the tmux I<window-name> to "ranger"?
 
 =item use_preview_script [bool] <zv>
 
diff --git a/examples/rc_emacs.conf b/examples/rc_emacs.conf
index ba8eaaeb..3b086efd 100644
--- a/examples/rc_emacs.conf
+++ b/examples/rc_emacs.conf
@@ -131,13 +131,11 @@ set display_free_space_in_status_bar true
 # Display files tags in all columns or only in main column?
 set display_tags_in_all_columns true
 
-# Set a title for the window?
+# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
+# properties.
 set update_title false
 
-# Set a title for the icon?
-set update_icon_title false
-
-# Set the title to "ranger" in the tmux program?
+# Set the tmux window-name to "ranger"?
 set update_tmux_title true
 
 # Shorten the title if it gets long?  The number defines how many
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 23601fb6..4a1b14e9 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -182,10 +182,11 @@ set display_tags_in_all_columns true
 # Set a title for the window?
 set update_title false
 
-# Set a title for the icon?
+# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
+# properties.
 set update_icon_title false
 
-# Set the title to "ranger" in the tmux program?
+# Set the tmux window-name to "ranger"?
 set update_tmux_title true
 
 # Shorten the title if it gets long?  The number defines how many
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 5f0c528b..6fc2da5e 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -87,7 +87,6 @@ ALLOWED_SETTINGS = {
     'tilde_in_titlebar': bool,
     'unicode_ellipsis': bool,
     'update_title': bool,
-    'update_icon_title': bool,
     'update_tmux_title': bool,
     'use_preview_script': bool,
     'vcs_aware': bool,
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 38065182..f2cd1715 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -22,7 +22,8 @@ MOUSEMASK = curses.ALL_MOUSE_EVENTS | curses.REPORT_MOUSE_POSITION
 
 # This escape is not available with a capname from terminfo unlike
 # tsl (to_status_line), so it's hardcoded here. It's used just like tsl,
-# but it sets the icon title instead of the window title.
+# but it sets the icon title (WM_ICON_NAME) instead of the window title
+# (WM_NAME).
 ESCAPE_ICON_TITLE = '\033]1;'
 
 _ASCII = ''.join(chr(c) for c in range(32, 127))
@@ -373,9 +374,7 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
         """Draw all objects in the container"""
         self.win.touchwin()
         DisplayableContainer.draw(self)
-        if self._draw_title \
-            and (self.settings.update_title
-                 or self.settings.update_icon_title):
+        if self._draw_title and self.settings.update_title:
             cwd = self.fm.thisdir.path
             if self.settings.tilde_in_titlebar \
                and (cwd == self.fm.home_path
@@ -389,17 +388,11 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
                 fixed_cwd = cwd.encode('utf-8', 'surrogateescape'). \
                     decode('utf-8', 'replace')
                 escapes = [
-                    (
-                        curses.tigetstr('tsl').decode('latin-1'),
-                        self.settings.update_title,
-                    ),
-                    (
-                        ESCAPE_ICON_TITLE,
-                        self.settings.update_icon_title,
-                    ),
+                    curses.tigetstr('tsl').decode('latin-1'),
+                    ESCAPE_ICON_TITLE
                 ]
                 bel = curses.tigetstr('fsl').decode('latin-1')
-                fmt_tups = [(e, fixed_cwd, bel) for e, s in escapes if s]
+                fmt_tups = [(e, fixed_cwd, bel) for e in escapes]
             except UnicodeError:
                 pass
             else: