|0.12.0||Jan 11, 2021|
|0.11.0||Nov 2, 2020|
|0.10.0||Aug 21, 2020|
|0.9.0||Jul 1, 2020|
|0.5.0||Apr 21, 2019|
#82 in GUI
220 downloads per month
Used in 7 crates (3 directly)
This crate includes all the types for interacting with i3ipc, along with some undocumented properties I found by browsing i3's source code. It also includes some basic sway support, though I don't personally use sway so I'm relying on PRs to maintain this feature.
This crate includes the definitions for all i3 ipc message responses, event types, and serialize/deserialize implementations using
serde. Additionally, I've included traits with default implementations for encoding and decoding for speaking i3's ipc protocol, so long as the type has implemented
My goal is to locate all of the type definitions for i3's IPC implementation here, so no one ever has to go through the tedium again. If anything is missing or not working, please fill out an issue or submit a PR, I'm happy to fix things or improve the library in any way I can.
By default this crate will include features for synchronous IO. Using
io::Read + io::Write
async-traits is enabled,
I3Protocol will be implemented for any trait that implements tokio's
AsyncRead + AsyncWrite
i3ipc-rs packs the event responses into a single enum, this is wasteful if you intend to receive responses to events for anything except workspaces & windows, since there is no indirection in the type definiton. Rust's memory layout for enums makes each variant take up to the size of the largest variant, that means that responses with relatively few fields like
OutputData would take up as much space as
WindowData. In this crate, that's not the case. There's a layer of indirection for
WindowData so that the minimum variant size remains small.