sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 212c6a18a2003f61bbbd7b6f4a881610e31b0c53
parent bad4e22f3be658f8688f308e54a48b65c071a952
Author: Mikkel Oscar Lyderik <mikkeloscar@gmail.com>
Date:   Tue, 23 Feb 2016 14:40:46 +0100

Add outputs to bar_config ipc response

Diffstat:
Msway/ipc-server.c | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/sway/ipc-server.c b/sway/ipc-server.c @@ -628,6 +628,17 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) { json_object_object_add(json, "colors", colors); + // Add outputs if defined + if (bar->outputs && bar->outputs->length > 0) { + json_object *outputs = json_object_new_array(); + int i; + for (i = 0; i < bar->outputs->length; ++i) { + const char *name = bar->outputs->items[i]; + json_object_array_add(outputs, json_object_new_string(name)); + } + json_object_object_add(json, "outputs", outputs); + } + return json; }