New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subscribing to specific event types #3462

Open
orestisf1993 opened this Issue Oct 18, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@orestisf1993
Member

orestisf1993 commented Oct 18, 2018

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

We can only subscribe to all the types of a specific event eg you might be interested only in window::focus events but you'll also receive window::new events. Some ipc libraries (eg i3ipc-python) do this themselves by only keeping the event types the user requests and dropping everything else.

Desired Behavior

We can subscribe to specific event types by sending messages like this:

type: SUBSCRIBE
payload: [ "workspace::new", "output" ]

One benefit is that users will be able to use i3-msg -t subscribe '[ "workspace::new" ]' (#3435) and only receive the events they are interested in without having to filter the output.

It's also better for performance / io operations because the data exchanged between i3 and clients can be reduced if the new feature is used by the libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment