add /statusbar tabmode actlist

The existing way how active tabs are displayed didn't allow showing more
than 10 tabs. This patch adds a mode where the statusbar shows a
comma-separated list of tabs which were active since the last time viewed.
This view is inspired by how `irssi` shows the active tabs, therefore
it is also called `actlist`.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2023-04-03 18:37:23 +02:00
parent 5f078f95f2
commit 0cf79848e9
7 changed files with 136 additions and 47 deletions

View File

@@ -6341,6 +6341,21 @@ cmd_statusbar(ProfWin* window, const char* const command, gchar** args)
}
}
if (g_strcmp0(args[0], "tabmode") == 0) {
char* tabmode = NULL;
if ((g_strcmp0(args[1], "default") == 0) || (g_strcmp0(args[1], "actlist") == 0)) {
tabmode = args[1];
}
if (tabmode == NULL) {
cons_bad_cmd_usage(command);
return TRUE;
}
prefs_set_string(PREF_STATUSBAR_TABMODE, tabmode);
cons_show("Using \"%s\" tabmode for statusbar.", tabmode);
ui_resize();
return TRUE;
}
if (g_strcmp0(args[0], "self") == 0) {
if (g_strcmp0(args[1], "barejid") == 0) {
prefs_set_string(PREF_STATUSBAR_SELF, "barejid");