diff options
Diffstat (limited to 'ttystatus/pathname.py')
-rw-r--r-- | ttystatus/pathname.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/ttystatus/pathname.py b/ttystatus/pathname.py index 0f5fb43..a8b8253 100644 --- a/ttystatus/pathname.py +++ b/ttystatus/pathname.py @@ -27,21 +27,11 @@ class Pathname(ttystatus.Widget): def __init__(self, key): self._key = key - self.interesting_keys = [key] self.pathname = '' - self.width = 0 - def format(self): - v = self.pathname - if len(v) > self.width: - ellipsis = '...' - if len(ellipsis) < self.width: - v = ellipsis + v[-(self.width - len(ellipsis)):] - else: - v = v[-self.width:] - return v + def __str__(self): + return self.pathname - def update(self, master, width): + def update(self, master): self.pathname = master.get(self._key, '') - self.width = width |