diff options
author | arkedos <dennis.marbaise@mailbox.org> | 2019-10-25 04:58:13 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2019-12-31 12:49:30 +0100 |
commit | 5acd73831ebdd409dcfac63b75ef462f81173d42 (patch) | |
tree | de54640be1489d48427b6ac419a39d0d409811f2 /ranger | |
parent | 515467584d95790d266ba24bad18f42745b580bd (diff) | |
download | ranger-5acd73831ebdd409dcfac63b75ef462f81173d42.tar.gz |
applying proposed tmux renaming fix
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/ui.py | 10 |
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() |