mirror of
https://github.com/tmux/tmux.git
synced 2025-01-13 03:48:51 +00:00
Add window-status-last-* options, from Boris Faure.
This commit is contained in:
parent
991bfcf443
commit
93224260ae
@ -686,6 +686,21 @@ const struct options_table_entry window_options_table[] = {
|
|||||||
.default_str = "#I:#W#F"
|
.default_str = "#I:#W#F"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ .name = "window-status-last-attr",
|
||||||
|
.type = OPTIONS_TABLE_ATTRIBUTES,
|
||||||
|
.default_num = 0
|
||||||
|
},
|
||||||
|
|
||||||
|
{ .name = "window-status-last-bg",
|
||||||
|
.type = OPTIONS_TABLE_COLOUR,
|
||||||
|
.default_num = 8
|
||||||
|
},
|
||||||
|
|
||||||
|
{ .name = "window-status-last-fg",
|
||||||
|
.type = OPTIONS_TABLE_COLOUR,
|
||||||
|
.default_num = 8
|
||||||
|
},
|
||||||
|
|
||||||
{ .name = "window-status-fg",
|
{ .name = "window-status-fg",
|
||||||
.type = OPTIONS_TABLE_COLOUR,
|
.type = OPTIONS_TABLE_COLOUR,
|
||||||
.default_num = 8
|
.default_num = 8
|
||||||
|
11
status.c
11
status.c
@ -705,6 +705,17 @@ status_print(
|
|||||||
gc->attr = attr;
|
gc->attr = attr;
|
||||||
fmt = options_get_string(oo, "window-status-current-format");
|
fmt = options_get_string(oo, "window-status-current-format");
|
||||||
}
|
}
|
||||||
|
if (wl == TAILQ_FIRST(&s->lastw)) {
|
||||||
|
fg = options_get_number(oo, "window-status-last-fg");
|
||||||
|
if (fg != 8)
|
||||||
|
colour_set_fg(gc, fg);
|
||||||
|
bg = options_get_number(oo, "window-status-last-bg");
|
||||||
|
if (bg != 8)
|
||||||
|
colour_set_bg(gc, bg);
|
||||||
|
attr = options_get_number(oo, "window-status-last-attr");
|
||||||
|
if (attr != 0)
|
||||||
|
gc->attr = attr;
|
||||||
|
}
|
||||||
|
|
||||||
if (wl->flags & WINLINK_BELL) {
|
if (wl->flags & WINLINK_BELL) {
|
||||||
fg = options_get_number(oo, "window-status-bell-fg");
|
fg = options_get_number(oo, "window-status-bell-fg");
|
||||||
|
9
tmux.1
9
tmux.1
@ -2823,6 +2823,15 @@ Like
|
|||||||
.Ar window-status-format ,
|
.Ar window-status-format ,
|
||||||
but is the format used when the window is the current window.
|
but is the format used when the window is the current window.
|
||||||
.Pp
|
.Pp
|
||||||
|
.It Ic window-status-last-attr Ar attributes
|
||||||
|
Set status line attributes for the last active window.
|
||||||
|
.Pp
|
||||||
|
.It Ic window-status-last-bg Ar colour
|
||||||
|
Set status line background colour for the last active window.
|
||||||
|
.Pp
|
||||||
|
.It Ic window-status-last-fg Ar colour
|
||||||
|
Set status line foreground colour for the last active window.
|
||||||
|
.Pp
|
||||||
.It Ic window-status-fg Ar colour
|
.It Ic window-status-fg Ar colour
|
||||||
Set status line foreground colour for a single window.
|
Set status line foreground colour for a single window.
|
||||||
.Pp
|
.Pp
|
||||||
|
Loading…
Reference in New Issue
Block a user