powerline-statusbar is a powerline inspired statusbar for nodejs based
commandline applications. It allows for easy rendering of powerline like bars,
containing arbitrary information.
powerline-statusbar is quite simple:
var Powerline = ;var statusline ="Some cool content" foreground: "white" background: "blue""Other content" foreground: "white" background: "orange";console;
Every bit of information is rendered into a
Segment. There are different
kinds of Segments available inside the
Library/Segment folder. If you need
a new segment just extend the
Library/Segment/Base segment, overriding the
constructor as well as the
provideContent method. Further options provided
by different segments can be easily seen in their corresponding code.
By default every segment supports the following options:
// Either a css color name, a hex value (eg. #ffff00) or a Ansi color// code (eg. 63)background: "yellow"// Either a css color name, a hex value (eg. #ffff00) or a Ansi color// code (eg. 63)foreground: "black"// Fill this separator to take all the console width after rendering all// segments. Only ONE segment is allowed to have this set to true.fill: false// Separator style to use deviding this segment from the one right of it.// Accepted values: none, normal, reversed, thin, thin-reversedseparator: "normal"
Ansi color codes have to be of type Number in order to work correctly.
To ease the usage within differently colored environments
Palettes are available
containing the ansi-codes for different color themes. They are stored inside
Library/Palette and can be accessed using