diff options
author | Josef Gajdusek <atx@atx.name> | 2019-05-28 21:33:15 +0200 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-05-28 22:43:11 -0400 |
commit | 2c6a10c4ba8e1ab97db81677e32ca1580e4f0430 (patch) | |
tree | 0e0b405643b4ebfefec09097facba7268e86ca6e | |
parent | 18476b0ec1fa58aa558f4c6b821e7243a64e4924 (diff) | |
download | sway-2c6a10c4ba8e1ab97db81677e32ca1580e4f0430.tar.xz |
Provide current DPMS state in GET_OUTPUTS
-rw-r--r-- | sway/ipc-json.c | 3 | ||||
-rw-r--r-- | sway/sway-ipc.7.scd | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 4af8d34b..b9abc47f 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -162,6 +162,8 @@ static void ipc_json_describe_output(struct sway_output *output, struct wlr_output *wlr_output = output->wlr_output; json_object_object_add(object, "type", json_object_new_string("output")); json_object_object_add(object, "active", json_object_new_boolean(true)); + json_object_object_add(object, "dpms", + json_object_new_boolean(output->wlr_output->enabled)); json_object_object_add(object, "primary", json_object_new_boolean(false)); json_object_object_add(object, "layout", json_object_new_string("output")); json_object_object_add(object, "orientation", @@ -233,6 +235,7 @@ json_object *ipc_json_describe_disabled_output(struct sway_output *output) { json_object_object_add(object, "name", 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, "primary", json_object_new_boolean(false)); json_object_object_add(object, "make", json_object_new_string(wlr_output->make)); diff --git a/sway/sway-ipc.7.scd b/sway/sway-ipc.7.scd index 3d22008e..df3d4448 100644 --- a/sway/sway-ipc.7.scd +++ b/sway/sway-ipc.7.scd @@ -205,6 +205,9 @@ following properties: |- active : boolean : Whether this output is active/enabled +|- dpms +: boolean +: Whether this output is on/off (via DPMS) |- primary : boolean : For i3 compatibility, this will be false. It does not make sense in Wayland |