diff options
author | toonn <toonn@toonn.io> | 2018-05-08 23:48:57 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2018-05-08 23:48:57 +0200 |
commit | eb46dc7569d0341198e7cd2ce649c00716d02790 (patch) | |
tree | a6671d5bf123d2b57856724bc75e69046088810a /ranger | |
parent | cba11af4181723334c25edb12e6ff0e4ec641cb5 (diff) | |
parent | b8a2311bd72f39d2adf4bc0c365c3c22e0ec3897 (diff) | |
download | ranger-eb46dc7569d0341198e7cd2ce649c00716d02790.tar.gz |
Merge branch 'tmuxtitle'
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/config/rc.conf | 2 | ||||
-rw-r--r-- | ranger/gui/ui.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index 3aac8dfd..ce0240c6 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -145,7 +145,7 @@ set display_tags_in_all_columns true set update_title false # Set the title to "ranger" in the tmux program? -set update_tmux_title false +set update_tmux_title true # Shorten the title if it gets long? The number defines how many # directories are displayed at once, 0 turns off this feature. diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index 990db0ad..4f76dfab 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -113,7 +113,7 @@ class UI( # pylint: disable=too-many-instance-attributes,too-many-public-method self._draw_title = curses.tigetflag('hs') # has_status_line # Save tmux setting `automatic-rename` - if self.settings.update_tmux_title: + 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() @@ -123,7 +123,7 @@ class UI( # pylint: disable=too-many-instance-attributes,too-many-public-method self.update_size() self.is_on = True - if self.settings.update_tmux_title: + if self.settings.update_tmux_title and 'TMUX' in os.environ: sys.stdout.write("\033kranger\033\\") sys.stdout.flush() @@ -172,7 +172,7 @@ class UI( # pylint: disable=too-many-instance-attributes,too-many-public-method DisplayableContainer.destroy(self) # Restore tmux setting `automatic-rename` - if self.settings.update_tmux_title: + if self.settings.update_tmux_title and 'TMUX' in os.environ: if self._tmux_automatic_rename: try: check_output(['tmux', 'set-window-option', |