diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c index 5740a40b..27efcbd1 100644 --- a/src/fe-text/statusbar-items.c +++ b/src/fe-text/statusbar-items.c @@ -78,6 +78,7 @@ static char *get_activity_list(MAIN_WINDOW_REC *window, int normal, int hilight) char *ret, *name, *value; int is_det; int add_name = settings_get_bool("actlist_names"); + int pref_name = settings_get_bool("actlist_prefer_window_name"); str = g_string_new(NULL); format = g_string_new(NULL); @@ -122,8 +123,11 @@ static char *get_activity_list(MAIN_WINDOW_REC *window, int normal, int hilight) g_string_printf(format, "{sb_act_hilight_color %s %d", window->hilight_color, window->refnum); + if (add_name && window->active != NULL) - g_string_append_printf(format, ":%s", window->active->visible_name); + g_string_append_printf(format, ":%s", + pref_name == 1 && window->name != NULL ? + window->name : window->active->visible_name); g_string_append_c(format, '}'); value = theme_format_expand(theme, format->str); @@ -470,6 +474,7 @@ void statusbar_items_init(void) settings_add_time("misc", "lag_min_show", "1sec"); settings_add_str("lookandfeel", "actlist_sort", "refnum"); settings_add_bool("lookandfeel", "actlist_names", FALSE); + settings_add_bool("lookandfeel", "actlist_prefer_window_name", FALSE); statusbar_item_register("window", NULL, item_window_active); statusbar_item_register("window_empty", NULL, item_window_empty);