summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--ranger/defaults/options.py1
-rw-r--r--ranger/gui/ui.py3
-rw-r--r--ranger/shared/settings.py2
4 files changed, 6 insertions, 2 deletions
diff --git a/TODO b/TODO
index 86ffdec7..fb0f01d4 100644
--- a/TODO
+++ b/TODO
@@ -41,7 +41,7 @@ General
    ( ) #55  10/01/24  allow change of filename when pasting
    ( ) #56  10/01/30  warn before deleting mount points
    ( ) #57  10/01/30  warn before deleting unseen marked files
-   ( ) #58  10/02/04  change the title of the terminal
+   (X) #58  10/02/04  change the title of the terminal
 
 
 Bugs
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index cb4d90f7..0b57b259 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -21,5 +21,6 @@ directories_first = True
 show_hidden = False
 collapse_preview = True
 autosave_bookmarks = True
+update_title = True
 
 hidden_filter = regexp(r'^\.|~$|\.(:?pyc|pyo|bak|swp)$')
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index a8353c7d..61a64fc2 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -12,6 +12,7 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
+import sys
 import curses
 import _curses
 
@@ -183,6 +184,8 @@ class UI(DisplayableContainer):
 		"""Erase the window, then draw all objects in the container"""
 		self.win.touchwin()
 		DisplayableContainer.draw(self)
+		if self.settings.update_title:
+			sys.stdout.write("\033]2;atom" + self.fm.env.pwd.path + "\007")
 		self.win.refresh()
 
 	def finalize(self):
diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py
index 2a86e052..3d634652 100644
--- a/ranger/shared/settings.py
+++ b/ranger/shared/settings.py
@@ -16,7 +16,7 @@ ALLOWED_SETTINGS = """
 show_hidden scroll_offset
 directories_first sort reverse
 preview_files max_history_size colorscheme
-collapse_preview
+collapse_preview update_title
 hidden_filter flushinput
 max_dirsize_for_autopreview autosave_bookmarks
 """.split()