summary refs log tree commit diff stats
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',
vc@akkartik.com> 2017-03-08 19:02:59 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2017-03-08 19:02:59 -0800 3764 - better colors for cross-links' href='/akkartik/mu/commit/update_html?h=hlt&id=4a39d12d4568f76ebf45b34cec722d8e0bcf1207'>4a39d12d ^
8bf0c436 ^
2564eb6f ^
4a39d12d ^
2564eb6f ^

8bf0c436 ^
2564eb6f ^



8bf0c436 ^









f5465e12 ^
ccae4585 ^





f5465e12 ^


ba6621b5 ^




f40b079c ^
ba6621b5 ^




201458e3 ^
ba6621b5 ^




9a7e1a0f ^
ba6621b5 ^






9a7e1a0f ^
ba6621b5 ^


608a7fa8 ^
ba6621b5 ^


25ad969f ^
c762564b ^
5a2cb154 ^
608a7fa8 ^



c762564b ^
9a7e1a0f ^
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101