aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/rc_emacs.conf2
-rw-r--r--ranger/config/rc.conf2
-rw-r--r--ranger/gui/ui.py7
3 files changed, 6 insertions, 5 deletions
diff --git a/examples/rc_emacs.conf b/examples/rc_emacs.conf
index 26074a42..8924d1d6 100644
--- a/examples/rc_emacs.conf
+++ b/examples/rc_emacs.conf
@@ -129,7 +129,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/config/rc.conf b/ranger/config/rc.conf
index 38e6f11e..39240b06 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -144,7 +144,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..4446cb29 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -9,6 +9,7 @@ import threading
import curses
from subprocess import CalledProcessError
+from ranger.ext.get_executables import get_executables
from ranger.ext.keybinding_parser import KeyBuffer, KeyMaps, ALT_KEY
from ranger.ext.lazy_property import lazy_property
from ranger.ext.signals import Signal
@@ -113,7 +114,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 get_executables():
try:
self._tmux_automatic_rename = check_output(
['tmux', 'show-window-options', '-v', 'automatic-rename']).strip()
@@ -123,7 +124,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 get_executables():
sys.stdout.write("\033kranger\033\\")
sys.stdout.flush()
@@ -172,7 +173,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 get_executables():
if self._tmux_automatic_rename:
try:
check_output(['tmux', 'set-window-option',