diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2022-06-23 20:50:16 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2022-06-23 20:50:16 +0200 |
| commit | b37b1151bc3ba6e94dc72e5292ea173f78bd3111 (patch) | |
| tree | 45ef663160673d0ff79dd50c33b78a096a376442 | |
| parent | 53a28c1b49b782888b0b243522f36b3f414faf27 (diff) | |
ipc: add "power" to output reply
| -rw-r--r-- | sway/ipc-json.c | 3 | ||||
| -rw-r--r-- | sway/sway-ipc.7.scd | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index f52a5ecd..287c158d 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -277,6 +277,8 @@ static void ipc_json_describe_enabled_output(struct sway_output *output, json_object_object_add(object, "active", json_object_new_boolean(true)); json_object_object_add(object, "dpms", json_object_new_boolean(wlr_output->enabled)); + json_object_object_add(object, "power", + json_object_new_boolean(wlr_output->enabled)); json_object_object_add(object, "layout", json_object_new_string("output")); json_object_object_add(object, "orientation", json_object_new_string( @@ -354,6 +356,7 @@ json_object *ipc_json_describe_disabled_output(struct sway_output *output) { json_object_new_string(wlr_output->name)); json_object_object_add(object, "active", json_object_new_boolean(false)); json_object_object_add(object, "dpms", json_object_new_boolean(false)); + json_object_object_add(object, "power", json_object_new_boolean(false)); json_object_object_add(object, "current_workspace", NULL); diff --git a/sway/sway-ipc.7.scd b/sway/sway-ipc.7.scd index 5cdcb99b..c7a2c473 100644 --- a/sway/sway-ipc.7.scd +++ b/sway/sway-ipc.7.scd @@ -213,7 +213,10 @@ following properties: : Whether this output is active/enabled |- dpms : boolean -: Whether this output is on/off (via DPMS) +: (Deprecated, use _power_ instead) Whether this output is on/off (via DPMS) +|- power +: boolean +: Whether this output is on/off |- primary : boolean : For i3 compatibility, this will be false. It does not make sense in Wayland |
