summaryrefslogtreecommitdiff
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authorJason Nader <[email protected]>2020-06-13 12:32:24 +0900
committerBrian Ashworth <[email protected]>2020-06-14 00:55:14 -0400
commit45859be03f14fa0506ab8518feaec5ddb157e318 (patch)
treee838990235ecf0a4f543999ea292c0c5167957df /sway/ipc-json.c
parentf9361ae36c586d78db34307f538508ab0dd8f486 (diff)
i3-compat: add GET_BINDING_STATE IPC command
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 066fd8db..70b81ad1 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -1261,3 +1261,10 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) {
#endif
return json;
}
+
+json_object *ipc_json_get_binding_mode(void) {
+ json_object *current_mode = json_object_new_object();
+ json_object_object_add(current_mode, "name",
+ json_object_new_string(config->current_mode->name));
+ return current_mode;
+}