diff --git a/src/config/theme.c b/src/config/theme.c index 329b30e6..bc8a1b8b 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -150,6 +150,7 @@ theme_init(const char *const theme_name) g_hash_table_insert(defaults, strdup("roster.room.mention"), strdup("green")); g_hash_table_insert(defaults, strdup("occupants.header"), strdup("yellow")); g_hash_table_insert(defaults, strdup("untrusted"), strdup("red")); + g_hash_table_insert(defaults, strdup("cmd.wins.unread"), strdup("white")); _load_preferences(); } @@ -756,6 +757,7 @@ theme_attrs(theme_item_t attrs) case THEME_ROSTER_ROOM_MENTION: _theme_prep_fgnd("roster.room.mention", lookup_str, &bold); break; case THEME_OCCUPANTS_HEADER: _theme_prep_fgnd("occupants.header", lookup_str, &bold); break; case THEME_UNTRUSTED: _theme_prep_fgnd("untrusted", lookup_str, &bold); break; + case THEME_CMD_WINS_UNREAD: _theme_prep_fgnd("cmd.wins.unread", lookup_str, &bold); break; case THEME_WHITE: g_string_append(lookup_str, "white"); bold = FALSE; break; case THEME_WHITE_BOLD: g_string_append(lookup_str, "white"); bold = TRUE; break; case THEME_GREEN: g_string_append(lookup_str, "green"); bold = FALSE; break; diff --git a/src/config/theme.h b/src/config/theme.h index e9444b1c..128ef44b 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -137,6 +137,7 @@ typedef enum { THEME_MAGENTA, THEME_MAGENTA_BOLD, THEME_TEXT_HISTORY, + THEME_CMD_WINS_UNREAD, } theme_item_t; void theme_init(const char *const theme_name); diff --git a/src/ui/console.c b/src/ui/console.c index 94fbba33..4045636f 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -498,7 +498,11 @@ cons_show_wins(gboolean unread) GSList *curr = window_strings; while (curr) { - win_println(console, THEME_DEFAULT, '-', "%s", curr->data); + if (g_strstr_len(curr->data, strlen(curr->data), " unread") > 0) { + win_println(console, THEME_CMD_WINS_UNREAD, '-', "%s", curr->data); + } else { + win_println(console, THEME_DEFAULT, '-', "%s", curr->data); + } curr = g_slist_next(curr); } g_slist_free_full(window_strings, free); diff --git a/theme_template b/theme_template index 5f4ddf5f..55de8521 100644 --- a/theme_template +++ b/theme_template @@ -79,6 +79,7 @@ roster.room.mention= occupants.header= receipt.sent= untrusted= +cmd.wins.unread= [ui] beep=