summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorarkedos <dennis.marbaise@mailbox.org>2019-10-25 04:58:13 +0200
committertoonn <toonn@toonn.io>2019-12-31 12:49:30 +0100
commit5acd73831ebdd409dcfac63b75ef462f81173d42 (patch)
treede54640be1489d48427b6ac419a39d0d409811f2
parent515467584d95790d266ba24bad18f42745b580bd (diff)
downloadranger-5acd73831ebdd409dcfac63b75ef462f81173d42.tar.gz
applying proposed tmux renaming fix
-rw-r--r--ranger/gui/ui.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index b6ea0886..83c63e57 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -122,7 +122,9 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
             if self.settings.update_tmux_title and 'TMUX' in os.environ:
                 try:
                     self._tmux_automatic_rename = check_output(
-                        ['tmux', 'show-window-options', '-v', 'automatic-rename']).strip()
+                        ['tmux', 'show-window-option', '-v', 'automatic-rename']).strip()
+                    if self._tmux_automatic_rename == 'off':
+                        self._tmux_automatic_rename = 'on'
                 except CalledProcessError:
                     self._tmux_automatic_rename = None
 
@@ -130,6 +132,7 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
         self.is_on = True
 
         if self.settings.update_tmux_title and 'TMUX' in os.environ:
+            check_output(['tmux', 'rename-window', 'Ranger'])
             sys.stdout.write("\033kranger\033\\")
             sys.stdout.flush()
 
@@ -188,11 +191,6 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
                                   'automatic-rename', self._tmux_automatic_rename])
                 except CalledProcessError:
                     pass
-            else:
-                try:
-                    check_output(['tmux', 'set-window-option', '-u', 'automatic-rename'])
-                except CalledProcessError:
-                    pass
 
         self.suspend()
 
us revision' href='/akkartik/mu/blame/translate_subx_emulated?h=hlt&id=df8498fb8294cb07d02076cf3881617b5af07974'>^
9e5e87ca ^
9e5e87ca ^
9e5e87ca ^
9e5e87ca ^
9e5e87ca ^
9e5e87ca ^
9e5e87ca ^
531f14c9 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33