aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index b9289e25..c49ea47e 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -2,6 +2,7 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <ctype.h> 3#include <ctype.h>
4#include "log.h" 4#include "log.h"
5#include "sway/config.h"
5#include "sway/ipc-json.h" 6#include "sway/ipc-json.h"
6#include "sway/tree/container.h" 7#include "sway/tree/container.h"
7#include "sway/tree/workspace.h" 8#include "sway/tree/workspace.h"
@@ -41,6 +42,7 @@ json_object *ipc_json_get_version() {
41 json_object_object_add(version, "major", json_object_new_int(major)); 42 json_object_object_add(version, "major", json_object_new_int(major));
42 json_object_object_add(version, "minor", json_object_new_int(minor)); 43 json_object_object_add(version, "minor", json_object_new_int(minor));
43 json_object_object_add(version, "patch", json_object_new_int(patch)); 44 json_object_object_add(version, "patch", json_object_new_int(patch));
45 json_object_object_add(version, "loaded_config_file_name", json_object_new_string(config->current_config_path));
44 46
45 return version; 47 return version;
46} 48}
@@ -168,7 +170,8 @@ static void ipc_json_describe_workspace(struct sway_container *workspace,
168 json_object_object_add(object, "output", workspace->parent ? 170 json_object_object_add(object, "output", workspace->parent ?
169 json_object_new_string(workspace->parent->name) : NULL); 171 json_object_new_string(workspace->parent->name) : NULL);
170 json_object_object_add(object, "type", json_object_new_string("workspace")); 172 json_object_object_add(object, "type", json_object_new_string("workspace"));
171 json_object_object_add(object, "urgent", json_object_new_boolean(false)); 173 json_object_object_add(object, "urgent",
174 json_object_new_boolean(workspace->sway_workspace->urgent));
172 json_object_object_add(object, "representation", workspace->formatted_title ? 175 json_object_object_add(object, "representation", workspace->formatted_title ?
173 json_object_new_string(workspace->formatted_title) : NULL); 176 json_object_new_string(workspace->formatted_title) : NULL);
174 177
@@ -194,6 +197,10 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
194 json_object_object_add(object, "layout", 197 json_object_object_add(object, "layout",
195 json_object_new_string(ipc_json_layout_description(c->layout))); 198 json_object_new_string(ipc_json_layout_description(c->layout)));
196 } 199 }
200
201 bool urgent = c->type == C_VIEW ?
202 view_is_urgent(c->sway_view) : container_has_urgent_child(c);
203 json_object_object_add(object, "urgent", json_object_new_boolean(urgent));
197} 204}
198 205
199static void focus_inactive_children_iterator(struct sway_container *c, void *data) { 206static void focus_inactive_children_iterator(struct sway_container *c, void *data) {