diff options
author | hut <hut@lavabit.com> | 2010-09-15 22:31:18 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-09-15 22:31:18 +0200 |
commit | 50e17b62cc62fb8532a88afbe4c313a7dcf1d5b8 (patch) | |
tree | 865e22a83e0bda335553e49d42ba297f1f042487 | |
parent | b5124cee669f270b016aad40ae6ddd7176fa3b9c (diff) | |
download | ranger-50e17b62cc62fb8532a88afbe4c313a7dcf1d5b8.tar.gz |
More intuitive statusbar content
-rw-r--r-- | ranger/gui/widgets/statusbar.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py index 3019930b..2a92f313 100644 --- a/ranger/gui/widgets/statusbar.py +++ b/ranger/gui/widgets/statusbar.py @@ -224,19 +224,23 @@ class StatusBar(Widget): right.add(human_readable(sum(f.size \ for f in target.marked_items \ if f.is_file), seperator='')) - right.add(" / " + str(len(target.marked_items))) + right.add("/" + str(len(target.marked_items))) else: - right.add(human_readable(target.disk_usage, seperator='')) - right.add(", ", "space") + right.add(human_readable(target.disk_usage, seperator='') + + " sum, ") right.add(human_readable(self.env.get_free_space( \ - target.mount_path), seperator='')) + target.mount_path), seperator='') + " free") right.add(" ", "space") if target.marked_items: # Indicate that there are marked files. Useful if you scroll # away and don't see them anymore. right.add('Mrk', base, 'marked') - elif max_pos > 0: + elif len(target.files): + right.add(str(target.pointer + 1) + '/' + + str(len(target.files)) + ' ', base) + if max_pos == 0: + right.add('All', base, 'all') if pos == 0: right.add('Top', base, 'top') elif pos >= max_pos: @@ -245,7 +249,7 @@ class StatusBar(Widget): right.add('{0:0>.0f}%'.format(100.0 * pos / max_pos), base, 'percentage') else: - right.add('All', base, 'all') + right.add('0/0 All', base, 'all') def _print_result(self, result): self.win.move(0, 0) |