Powerline Hgstatus
A simple Powerline segment for showing the status of a Mercurial working copy.
By Ian Scherer.
Glossary
-
î‚
: branch name or commit hash -
✖
: removed files -
✚
: changed files -
…
: untracked files
Requirements
The Hgstatus segment requires hg.
Installation
Installing the Hgstatus segment can be done with pip:
pip install powerline-hgstatus
The Hgstatus segment uses a couple of custom highlight groups. You'll need to define those groups in your colorscheme,
for example in .config/powerline/colorschemes/default.json
:
{
"groups": {
"hgstatus": { "fg": "gray8", "bg": "gray1", "attrs": [] },
"hgstatus_branch": { "fg": "gray9", "bg": "gray1", "attrs": [] },
"hgstatus_branch_clean": { "fg": "gray9", "bg": "gray1", "attrs": [] },
"hgstatus_branch_dirty": { "fg": "mediumorange", "bg": "gray1", "attrs": [] },
"hgstatus_missing": { "fg": "brightred", "bg": "gray1", "attrs": [] },
"hgstatus_modified": { "fg": "mediumorange", "bg": "gray1", "attrs": [] },
"hgstatus_untracked": { "fg": "brightestorange", "bg": "gray1", "attrs": [] },
"hgstatus:divider": { "fg": "gray5", "bg": "gray1", "attrs": [] }
}
}
Then you can activate the Hgstatus segment by adding it to your segment configuration,
for example in .config/powerline/themes/shell/default.json
:
{
"function": "powerline_hgstatus.hgstatus",
"priority": 40
}
Special Thanks
Jasper N. Brouwer for powerline-gitstatus
Shrey Banga for powerline-shell
License
Licensed under the MIT License.