|
| 1 | +# Indicator Statusline |
| 2 | + |
| 3 | +The indicator statusline used to be a feature, from the old DEC VT level 4 terminals. |
| 4 | +Contour revives this feature to prominently show the terminal status. |
| 5 | + |
| 6 | +## Configuration |
| 7 | + |
| 8 | +``` |
| 9 | +profiles: |
| 10 | + your_profile: |
| 11 | + status_line: |
| 12 | + indicator: |
| 13 | + left: "{VTType} │ {InputMode:Bold,Color=#C0C030}{SearchPrompt:Left= │ }{TraceMode:Bold,Color=#FFFF00,Left= │ }{ProtectedMode:Bold,Left= │ }" |
| 14 | + middle: "{Title:Left= « ,Right= » ,Color=#20c0c0}" |
| 15 | + right: "{HistoryLineCount:Faint,Color=#c0c0c0} │ {Clock:Bold} " |
| 16 | +``` |
| 17 | + |
| 18 | +Each segment, `left`, `middle`, and `right` may contain text to be displayed in the |
| 19 | +left, middle, or right segment of the indicator statusline. |
| 20 | + |
| 21 | +This text may contain placeholders to be replaced by their respective dynamic content. |
| 22 | + |
| 23 | +## Variables |
| 24 | + |
| 25 | +Variable | Description |
| 26 | +---------------------|-------------------------------------------------------------------- |
| 27 | +`{Clock}` | current clock in HH:MM format |
| 28 | +`{Command}` | yields the result of the given command prompt, as specified via parameter `Program=...` |
| 29 | +`{HistoryLineCount}` | number of lines in history (only available in primary screen) |
| 30 | +`{Hyperlink}` | reveals the hyperlink at the given mouse location |
| 31 | +`{InputMode}` | current input mode (e.g. INSERT, NORMAL, VISUAL) |
| 32 | +`{ProtectedMode}` | indicates protected mode, if currently enabled |
| 33 | +`{SearchMode}` | indicates search highlight mode, if currently active |
| 34 | +`{SearchPrompt}` | search input prompt, if currently active |
| 35 | +`{Text}` | given text (makes only sense when customized with flags) |
| 36 | +`{Title}` | current window title |
| 37 | +`{VTType}` | currently active VT emulation type |
| 38 | + |
| 39 | +## Formatting Styles |
| 40 | + |
| 41 | +Each Variable, as specified above, can be parametrized for customizing the look of it. |
| 42 | +The common syntax to these variables and their parameters looks as follows: |
| 43 | + |
| 44 | +``` |
| 45 | +{VariableName:SomeFlag,SomeKey=SomeValue} |
| 46 | +``` |
| 47 | + |
| 48 | +So parameters can be specified after a colon (`:`) as a comma separated list of flags and key/value pairs. |
| 49 | +A key/value pair is further split by equal sign (`=`). |
| 50 | + |
| 51 | +The following list of formatting styles are supported: |
| 52 | + |
| 53 | +Parameter | Description |
| 54 | +--------------------------|-------------------------------------------------------------------- |
| 55 | +`Left=TEXT` | text to show on the left side, if the variable is to be shown |
| 56 | +`Right=TEXT` | text to show on the right side, if the variable is to be shown |
| 57 | +`Color=#RRGGBB` | text color in hexadecimal RGB notation |
| 58 | +`BackgroundColor=#RRGGBB` | background color in hexadecimal RGB notation |
| 59 | +`Bold` | text in bold font face |
| 60 | +`Italic` | text in italic font face |
| 61 | +`Underline` | underline text (only one underline style can be active) |
| 62 | +`CurlyUnderline` | curly underline text (only one underline style can be active) |
| 63 | +`DoubleUnderline` | double underline text (only one underline style can be active) |
| 64 | +`DottedUnderline` | dotted underline text (only one underline style can be active) |
| 65 | +`DashedUnderline` | dashed underline text (only one underline style can be active) |
| 66 | +`Blinking` | blinking text |
| 67 | +`RapidBlinking` | rapid blinking text |
| 68 | +`Overline` | overline text |
| 69 | +`Inverse` | inversed text/background coloring |
| 70 | + |
| 71 | +These parameters apply to all variables above. |
| 72 | + |
| 73 | +The `Command` variable is the only one that requires a special attribute, `Program` whose value |
| 74 | +is the command to execute. |
0 commit comments