From 14c8ed430806aa1be1abd9e8cbd6a0fe508b8469 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 19 Mar 2010 16:10:44 +0100 Subject: gui.ui: replace your home directory with "~" in the title --- ranger/gui/ui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index 3bd566ae..af72ee68 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -202,6 +202,8 @@ class UI(DisplayableContainer): DisplayableContainer.draw(self) if self._draw_title and self.settings.update_title: cwd = self.fm.env.cwd.path + if cwd.startswith(self.env.home_path): + cwd = '~' + cwd[len(self.env.home_path):] if self.settings.shorten_title: split = cwd.rsplit(os.sep, self.settings.shorten_title) if os.sep in split[0]: -- cgit 1.4.1-2-gfad0