Skip to content

Conversation

@3akev
Copy link

@3akev 3akev commented Nov 11, 2025

This PR exposes the subscribe call to the QML API, allowing clients to receive subscribed events directly through rawEvent.

My use case is to receive input events in order to detect keyboard layout changes. See here and here for an example doing this.

@outfoxxed
Copy link
Member

The intention here is fine but it probably shouldn't be implemented like this, because subscriptions are not dropped between reloads. I would prefer to see something more declarative, e.g. I3IpcListener { subscriptions: []; onMessage: ... } unless you have a particular reason to do it this way.

@3akev
Copy link
Author

3akev commented Nov 13, 2025

Implemented a new QML type, as suggested. Here's a usage example. Let me know if further changes are needed.

@3akev 3akev changed the title i3/ipc: expose subscribe method to receive arbitrary events i3/ipc: implement reception of arbitrary IPC events in QML Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants