summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/format.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-10-10 10:41:34 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-10-10 10:41:34 +0000
commitd331a28b2ae144c50824c5a077d5415364143609 (patch)
tree11b712147a0c24f83addfab68c3bbc16402984ea /usr.bin/tmux/format.c
parentbcd3ca299928423cccafb95891ec2c87c594806b (diff)
Add a sixel_support format variable which is 1 if SIXEL is supported
(always 0 on OpenBSD), requested by Misaki Masa in GitHub issue 4177
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r--usr.bin/tmux/format.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index 10283c597cd..a396491840b 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.320 2024/08/26 07:14:40 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.321 2024/10/10 10:41:33 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2320,6 +2320,13 @@ format_cb_version(__unused struct format_tree *ft)
return (xstrdup(getversion()));
}
+/* Callback for sixel_support. */
+static void *
+format_cb_sixel_support(__unused struct format_tree *ft)
+{
+ return (xstrdup("0"));
+}
+
/* Callback for active_window_index. */
static void *
format_cb_active_window_index(struct format_tree *ft)
@@ -3147,6 +3154,9 @@ static const struct format_table_entry format_table[] = {
{ "session_windows", FORMAT_TABLE_STRING,
format_cb_session_windows
},
+ { "sixel_support", FORMAT_TABLE_STRING,
+ format_cb_sixel_support
+ },
{ "socket_path", FORMAT_TABLE_STRING,
format_cb_socket_path
},