aboutsummaryrefslogtreecommitdiff
path: root/swaymsg/main.c
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-29 17:42:11 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-05-29 17:42:11 +1000
commit6f4cb2b29d5a708d58a88c40ed6cc01bf471a8f0 (patch)
tree5aa498b0d4ec3a215a3ea70f082e6ab1d9f361f2 /swaymsg/main.c
parent3482eebaca090bff110199d5e00e59b4be376ff8 (diff)
Add tree representation to IPC workspace description
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r--swaymsg/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c
index bf56b80d..8a53474b 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -53,24 +53,28 @@ static void pretty_print_cmd(json_object *r) {
}
static void pretty_print_workspace(json_object *w) {
- json_object *name, *rect, *visible, *output, *urgent, *layout, *focused;
+ json_object *name, *rect, *visible, *output, *urgent, *layout,
+ *representation, *focused;
json_object_object_get_ex(w, "name", &name);
json_object_object_get_ex(w, "rect", &rect);
json_object_object_get_ex(w, "visible", &visible);
json_object_object_get_ex(w, "output", &output);
json_object_object_get_ex(w, "urgent", &urgent);
json_object_object_get_ex(w, "layout", &layout);
+ json_object_object_get_ex(w, "representation", &representation);
json_object_object_get_ex(w, "focused", &focused);
printf(
"Workspace %s%s%s%s\n"
" Output: %s\n"
- " Layout: %s\n\n",
+ " Layout: %s\n"
+ " Representation: %s\n\n",
json_object_get_string(name),
json_object_get_boolean(focused) ? " (focused)" : "",
!json_object_get_boolean(visible) ? " (off-screen)" : "",
json_object_get_boolean(urgent) ? " (urgent)" : "",
json_object_get_string(output),
- json_object_get_string(layout)
+ json_object_get_string(layout),
+ json_object_get_string(representation)
);
}