UNIX domain socket IPC in Rust.

The IPC patch is complete and has been merged into the main branch.

The patch was made possible with the interprocess crate and was later rewritten to raw stdlib implementation in this commit. Currently the server binary (swhks) makes a socket at /run/user/(YourUserID)/swhkd.sock which then the daemon binary (swhkd) tries to establish a connection with.

After merging the initial set of patches Ckyiu found 2 issues right away:

  • Calling the function physical_path() on any evdev::Device object returns None on virtual machines and hence the binary panics and crashes while attempting to execute .unwrap() on it. This issue has been taken care of in this commit.

  • The old error message “Invoking user is NOT in input group.” would lead users to add themselves to the input group, and we definitely don’t want that as stated in the previous blog. To counter this issue, swhkd now warns the user if they have input group access and gracefully exits.

All that remains now is config file handling which has been assigned to Angelo Fallaria, and key event handling which I will be implementing.

That is all for now 😀.