Skip to content
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

niri ipc support #8

Open
olifloof opened this issue Sep 13, 2024 · 4 comments · May be fixed by #70
Open

niri ipc support #8

olifloof opened this issue Sep 13, 2024 · 4 comments · May be fixed by #70
Labels
enhancement New feature or request

Comments

@olifloof
Copy link

olifloof commented Sep 13, 2024

https://github.com/YaLTeR/niri/tree/main/niri-ipc
https://github.com/YaLTeR/niri/wiki/IPC

especially EventStream which is available in 0.1.9 (latest release)

@brainlessbitch
Copy link

since the ipc is it's own create, couldn't the lib be written in rust and use the ipc create rather then reading from the socket like you'd normally do

@spazzylemons
Copy link

spazzylemons commented Sep 28, 2024

The current IPC protocol is simple enough that it's easy to at least put together an EventStream implementation in Vala, which I've been working on.

Using the official crate would be great, but my main concern would be thread safety, considering that the crate uses blocking I/O, whereas a Vala implementation can benefit from GLib concurrency

@kotontrion
Copy link
Collaborator

kotontrion commented Sep 28, 2024

The "hard" part is the state management. While the crate has that implemented, it would have to be wrapped as a gobject, so you can bind to it. You have to check what changed and set the gobject properties accordingly. So you basically have to do the state management yourself anyway. The only thing that could be used from the crate is the reading from the socket part, which is easy to implement in vala. Using the crate therefore provides only little benefit, but introduces a lot of overhead to make it usable as a gir lib. not worth it IMO.

@Aylur Aylur added the enhancement New feature or request label Sep 30, 2024
@spazzylemons
Copy link

I was working on an implementation a few weeks ago, but stopped working on it since I'm trying other compositors. It's mostly complete but the signals could use some work: https://github.com/spazzylemons/astal/tree/niri

Aylur pushed a commit that referenced this issue Nov 1, 2024
@sameoldlab sameoldlab linked a pull request Nov 10, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants