diff options
author | hut <hut@lavabit.com> | 2010-02-09 10:44:02 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-02-09 10:49:14 +0100 |
commit | 6a8d5d23fae4566106ef4c1efca18c35f447df3a (patch) | |
tree | c0ce9d327422cef7388c476b49ca6761a1fe7071 /ranger | |
parent | aea5cf928e2fdeef04315408229fedbb4e2fc977 (diff) | |
download | ranger-6a8d5d23fae4566106ef4c1efca18c35f447df3a.tar.gz |
implemented #58: update terminal title
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/defaults/options.py | 1 | ||||
-rw-r--r-- | ranger/gui/ui.py | 3 | ||||
-rw-r--r-- | ranger/shared/settings.py | 2 |
3 files changed, 5 insertions, 1 deletions
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() |