From 45859be03f14fa0506ab8518feaec5ddb157e318 Mon Sep 17 00:00:00 2001 From: Jason Nader Date: Sat, 13 Jun 2020 12:32:24 +0900 Subject: i3-compat: add GET_BINDING_STATE IPC command --- sway/ipc-json.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway/ipc-json.c') 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; +} -- cgit v1.2.3-54-g00ecf