From f18bcfcd69b514e1387bf37a42be6667a4c19282 Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Sat, 25 Apr 2020 15:10:22 -0400 Subject: Add each view's shell to JSON description This is a criteria you can use to select windows since commit 484cc189e909 ("Add shell criteria token"), but there's no way to query it for an existing window. This exposes its value in the output of `swaymsg -t get_tree`. --- sway/ipc-json.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sway/ipc-json.c') diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 1ebc3bd2..46c52156 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -493,6 +493,8 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object json_object_object_add(object, "max_render_time", json_object_new_int(c->view->max_render_time)); + json_object_object_add(object, "shell", json_object_new_string(view_get_shell(c->view))); + #if HAVE_XWAYLAND if (c->view->type == SWAY_VIEW_XWAYLAND) { json_object_object_add(object, "window", -- cgit v1.2.3-54-g00ecf