Merge branch 'tmux:master' into issue-4412-choose-tree-format-prints-wrong-values

This commit is contained in:
Michael Grant
2025-03-21 09:30:17 -04:00
committed by GitHub
38 changed files with 680 additions and 266 deletions

View File

@@ -1544,6 +1544,23 @@ format_cb_client_written(struct format_tree *ft)
return (NULL);
}
/* Callback for client_theme. */
static void *
format_cb_client_theme(struct format_tree *ft)
{
if (ft->c != NULL) {
switch (ft->c->theme) {
case THEME_DARK:
return (xstrdup("dark"));
case THEME_LIGHT:
return (xstrdup("light"));
case THEME_UNKNOWN:
return (NULL);
}
}
return (NULL);
}
/* Callback for config_files. */
static void *
format_cb_config_files(__unused struct format_tree *ft)
@@ -2881,6 +2898,9 @@ static const struct format_table_entry format_table[] = {
{ "client_termtype", FORMAT_TABLE_STRING,
format_cb_client_termtype
},
{ "client_theme", FORMAT_TABLE_STRING,
format_cb_client_theme
},
{ "client_tty", FORMAT_TABLE_STRING,
format_cb_client_tty
},