aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--format.c2
-rw-r--r--tmux.11
2 files changed, 3 insertions, 0 deletions
diff --git a/format.c b/format.c
index 8a52b0e1..aff34abb 100644
--- a/format.c
+++ b/format.c
@@ -711,6 +711,8 @@ format_defaults_client(struct format_tree *ft, struct client *c)
format_add(ft, "client_tty", "%s", c->tty.path);
if (c->tty.termname != NULL)
format_add(ft, "client_termname", "%s", c->tty.termname);
+ format_add(ft, "client_control_mode", "%d",
+ !!(c->flags & CLIENT_CONTROL));
t = c->creation_time.tv_sec;
format_add(ft, "client_created", "%lld", (long long) t);
diff --git a/tmux.1 b/tmux.1
index db5f314e..b4c608cb 100644
--- a/tmux.1
+++ b/tmux.1
@@ -3358,6 +3358,7 @@ The following variables are available, where appropriate:
.It Li "client_activity_string" Ta "" Ta "String time client last had activity"
.It Li "client_created" Ta "" Ta "Integer time client created"
.It Li "client_created_string" Ta "" Ta "String time client created"
+.It Li "client_control_mode" Ta "" Ta "1 if client is in control mode"
.It Li "client_height" Ta "" Ta "Height of client"
.It Li "client_last_session" Ta "" Ta "Name of the client's last session"
.It Li "client_pid" Ta "" Ta "PID of client process"