yabai.rs
A Rust library for communicating with the yabai tiling window manager's ipc socket, acting as a Rust equivalent of the yabai -m command.
Installation
Add the following to your Cargo.toml:
[]
= "0.5.0"
or using cargo add:
Sending Commands
You can send commands in a yabai -m like fashion, using a string:
send;
Alternatively, you can use the Command enum for more strongly-typed inputs:
let command = FocusSpace ;
send_command?;
Queries
Displays, spaces, and windows can all be queried:
let displays = query_displays?; // Vec<DisplayInfo>
let spaces = query_spaces?; // Vec<SpaceInfo>
let windows = query_windows?; // Vec<WindowInfo>
Cargo Features
"python"- Addspyo3derive attributes to yabai command enums.