1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 00:24:17 +01:00
sway/swaymsg
Brian Ashworth bf9a52bab0 Implement support for swaymsg -t SUBSCRIBE [-m]
In `i3 4.16`, `i3-msg` can be used with the message type `subscribe`
and has the ability to monitor for responses until killed. This adds
support for both to swaymsg.

If the JSON array of event types is malformed or contains an invalid
event, sway will send a response with `success` set to `false`. If
swaymsg sees this, it will not display the failure and exit.

If the `subscribe` event is successful, swaymsg will wait for the first
response and display that instead of the success message. If
`-m/--monitor` is given, swaymsg will continue monitor for responses
until killed or a malformed response is received.

For the `subscribe` event, the responses will always be printed as JSON.
If `-r/--raw` is given, the JSON will not be pretty printed, which may
be preferred when monitoring due to there being multiple responses.

Example: `swaymsg -t SUBSCRIBE -m "['window']"`
2018-11-28 11:19:18 -05:00
..
main.c Implement support for swaymsg -t SUBSCRIBE [-m] 2018-11-28 11:19:18 -05:00
meson.build Add support for installing binaries with DT_RPATH 2018-09-30 15:37:01 +03:00
swaymsg.1.scd Implement support for swaymsg -t SUBSCRIBE [-m] 2018-11-28 11:19:18 -05:00