i3ipc-rs
i3ipc-rs copied to clipboard
Add support for marks to get_tree
This change makes the following changes:
- Add a new feature (
i3-4-18-1
) to support marks in the nodes returned fromget_tree
- Add an example illustrating how to use the
get_tree
command - Add a
marks
field to theNode
struct, when thei3-4-18-1
feature is enabled - Populate the
marks
field in theNode
struct on a call to get_tree, when thei3-4-18-1
feature is enabled - Add documentation from the README to
lib.rs
so it's available in the crate documentation - Apply
cargo fmt
to lib.rs and common.rs - Add a test that tests to ensure a mark comes back when calling
get_tree
with thei3-4-18-1
feature enabled
Questions
- The
Node
struct is constructed for the container when a window event is received; will this container also always have the marks property set coming back from the i3 API? - Same question as above about the workspace event.
I think it should be okay, based on the way the JSON is being parsed. If the marks field is missing, I think it'll just be an empty vec.
Assuming I'm right about these changes, this should close #59
Also, I'm not sure how you handle versioning, so I didn't touch that in this PR so far.