diff options
author | nfnty <git@nfnty.se> | 2016-02-08 02:31:27 +0100 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2016-02-08 04:43:05 +0100 |
commit | b72ad9ae5a04529865ec154b670771d4f7950bb2 (patch) | |
tree | 6824428b7e590e259642332bd946d62cc46445d0 /ranger | |
parent | 9c80132600b764ff913c18c1bae9171343680c82 (diff) | |
download | ranger-b72ad9ae5a04529865ec154b670771d4f7950bb2.tar.gz |
VCS: Add date to statusbar
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/colorschemes/default.py | 3 | ||||
-rw-r--r-- | ranger/gui/context.py | 2 | ||||
-rw-r--r-- | ranger/gui/widgets/statusbar.py | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/ranger/colorschemes/default.py b/ranger/colorschemes/default.py index 967fa50c..e5dbf3a6 100644 --- a/ranger/colorschemes/default.py +++ b/ranger/colorschemes/default.py @@ -100,6 +100,9 @@ class Default(ColorScheme): if context.vcscommit: fg = yellow attr &= ~bold + if context.vcsdate: + fg = cyan + attr &= ~bold if context.text: diff --git a/ranger/gui/context.py b/ranger/gui/context.py index 6b341bf1..ac597e5a 100644 --- a/ranger/gui/context.py +++ b/ranger/gui/context.py @@ -17,7 +17,7 @@ CONTEXT_KEYS = ['reset', 'error', 'badinfo', 'title', 'text', 'highlight', 'bars', 'quotes', 'tab', 'loaded', 'keybuffer', 'infostring', - 'vcsfile', 'vcsremote', 'vcsinfo', 'vcscommit', + 'vcsfile', 'vcsremote', 'vcsinfo', 'vcscommit', 'vcsdate', 'vcsconflict', 'vcschanged', 'vcsunknown', 'vcsignored', 'vcsstaged', 'vcssync', 'vcsnone', 'vcsbehind', 'vcsahead', 'vcsdiverged'] diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py index 0fbd0113..fbd53855 100644 --- a/ranger/gui/widgets/statusbar.py +++ b/ranger/gui/widgets/statusbar.py @@ -200,7 +200,9 @@ class StatusBar(Widget): left.add(vcsstr.strip(), 'vcsfile', *vcscol) if directory.vcs.rootvcs.head: left.add_space() - left.add('{0:s}'.format(directory.vcs.rootvcs.head['summary']), 'vcscommit') + left.add(str(directory.vcs.rootvcs.head['date']), 'vcsdate') + left.add_space() + left.add(directory.vcs.rootvcs.head['summary'], 'vcscommit') def _get_owner(self, target): uid = target.stat.st_uid |