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

@@ -1293,6 +1293,7 @@ static const struct cmd_t command_defs[] = {
"/statusbar hide name|number|read",
"/statusbar maxtabs <value>",
"/statusbar tablen <value>",
"/statusbar tabmode default|actlist",
"/statusbar self user|barejid|fulljid|off",
"/statusbar chat user|jid",
"/statusbar room room|jid",
@@ -1303,6 +1304,7 @@ static const struct cmd_t command_defs[] = {
CMD_ARGS(
{ "maxtabs <value>", "Set the maximum number of tabs to display, <value> must be between 0 and 10." },
{ "tablen <value>", "Set the maximum number of characters to show as the tab name, 0 sets to unlimited." },
{ "tabmode default|actlist", "Set the mode how the 'active tabs' are shown." },
{ "show|hide name", "Show or hide names in tabs." },
{ "show|hide number", "Show or hide numbers in tabs." },
{ "show|hide read", "Show or hide inactive tabs." },
@@ -1315,6 +1317,7 @@ static const struct cmd_t command_defs[] = {
CMD_EXAMPLES(
"/statusbar maxtabs 8",
"/statusbar tablen 5",
"/statusbar tabmode actlist",
"/statusbar self user",
"/statusbar chat jid",
"/statusbar hide read",