diff --git a/options-table.c b/options-table.c index 20f5ae01..8bc61149 100644 --- a/options-table.c +++ b/options-table.c @@ -570,17 +570,47 @@ const struct options_table_entry window_options_table[] = { .default_num = 0 /* overridden in main() */ }, - { .name = "window-status-alert-attr", + { .name = "window-status-bell-attr", .type = OPTIONS_TABLE_ATTRIBUTES, .default_num = GRID_ATTR_REVERSE }, - { .name = "window-status-alert-bg", + { .name = "window-status-bell-bg", .type = OPTIONS_TABLE_COLOUR, .default_num = 8 }, - { .name = "window-status-alert-fg", + { .name = "window-status-bell-fg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 8 + }, + + { .name = "window-status-content-attr", + .type = OPTIONS_TABLE_ATTRIBUTES, + .default_num = GRID_ATTR_REVERSE + }, + + { .name = "window-status-content-bg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 8 + }, + + { .name = "window-status-content-fg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 8 + }, + + { .name = "window-status-activity-attr", + .type = OPTIONS_TABLE_ATTRIBUTES, + .default_num = GRID_ATTR_REVERSE + }, + + { .name = "window-status-activity-bg", + .type = OPTIONS_TABLE_COLOUR, + .default_num = 8 + }, + + { .name = "window-status-activity-fg", .type = OPTIONS_TABLE_COLOUR, .default_num = 8 }, diff --git a/status.c b/status.c index 041382fb..2fb89d1f 100644 --- a/status.c +++ b/status.c @@ -684,14 +684,34 @@ status_print( fmt = options_get_string(oo, "window-status-current-format"); } - if (wl->flags & WINLINK_ALERTFLAGS) { - fg = options_get_number(oo, "window-status-alert-fg"); + if (wl->flags & WINLINK_BELL) { + fg = options_get_number(oo, "window-status-bell-fg"); if (fg != 8) colour_set_fg(gc, fg); - bg = options_get_number(oo, "window-status-alert-bg"); + bg = options_get_number(oo, "window-status-bell-bg"); if (bg != 8) colour_set_bg(gc, bg); - attr = options_get_number(oo, "window-status-alert-attr"); + attr = options_get_number(oo, "window-status-bell-attr"); + if (attr != 0) + gc->attr = attr; + } else if (wl->flags & WINLINK_CONTENT) { + fg = options_get_number(oo, "window-status-content-fg"); + if (fg != 8) + colour_set_fg(gc, fg); + bg = options_get_number(oo, "window-status-content-bg"); + if (bg != 8) + colour_set_bg(gc, bg); + attr = options_get_number(oo, "window-status-content-attr"); + if (attr != 0) + gc->attr = attr; + } else if (wl->flags & (WINLINK_ACTIVITY|WINLINK_SILENCE)) { + fg = options_get_number(oo, "window-status-activity-fg"); + if (fg != 8) + colour_set_fg(gc, fg); + bg = options_get_number(oo, "window-status-activity-bg"); + if (bg != 8) + colour_set_bg(gc, bg); + attr = options_get_number(oo, "window-status-activity-attr"); if (attr != 0) gc->attr = attr; } diff --git a/tmux.1 b/tmux.1 index 6b036bb3..6a73949a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2516,15 +2516,32 @@ Instructs .Nm to expect UTF-8 sequences to appear in this window. .Pp -.It Ic window-status-alert-attr Ar attributes -Set status line attributes for windows which have an alert (bell, activity -or content). +.It Ic window-status-bell-attr Ar attributes +Set status line attributes for windows which have a bell alert. .Pp -.It Ic window-status-alert-bg Ar colour -Set status line background colour for windows with an alert. +.It Ic window-status-bell-bg Ar colour +Set status line background colour for windows with a bell alert. .Pp -.It Ic window-status-alert-fg Ar colour -Set status line foreground colour for windows with an alert. +.It Ic window-status-bell-fg Ar colour +Set status line foreground colour for windows with a bell alert. +.Pp +.It Ic window-status-content-attr Ar attributes +Set status line attributes for windows which have a content alert. +.Pp +.It Ic window-status-content-bg Ar colour +Set status line background colour for windows with a content alert. +.Pp +.It Ic window-status-content-fg Ar colour +Set status line foreground colour for windows with a content alert. +.Pp +.It Ic window-status-activity-attr Ar attributes +Set status line attributes for windows which have an activity (or silence) alert. +.Pp +.It Ic window-status-activity-bg Ar colour +Set status line background colour for windows with an activity alert. +.Pp +.It Ic window-status-activity-fg Ar colour +Set status line foreground colour for windows with an activity alert. .Pp .It Ic window-status-attr Ar attributes Set status line attributes for a single window.