Add option to include status text in the pane borders. If

pane-border-status is set to "top" or "bottom" (rather than "off"),
every pane has a permanent top or bottom border containing the text from
pane-border-format.

Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and
simplified by me.
This commit is contained in:
nicm
2016-04-29 15:00:48 +00:00
parent 0d84fdd953
commit 0509be0740
8 changed files with 239 additions and 35 deletions

View File

@@ -51,6 +51,9 @@ const char *options_table_status_position_list[] = {
const char *options_table_bell_action_list[] = {
"none", "any", "current", "other", NULL
};
const char *options_table_pane_status_list[] = {
"off", "top", "bottom", NULL
};
/* Server options. */
const struct options_table_entry options_table[] = {
@@ -693,6 +696,19 @@ const struct options_table_entry options_table[] = {
.style = "pane-border-style"
},
{ .name = "pane-border-format",
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW,
.default_str = "#{?pane_active,#[reverse],}#{pane_index}#[default] \"#{pane_title}\""
},
{ .name = "pane-border-status",
.type = OPTIONS_TABLE_CHOICE,
.scope = OPTIONS_TABLE_WINDOW,
.choices = options_table_pane_status_list,
.default_num = 0
},
{ .name = "pane-border-style",
.type = OPTIONS_TABLE_STYLE,
.scope = OPTIONS_TABLE_WINDOW,