Expand description
A Rust crate for communicating with the yabai tiling window manager.
§Examples:
Send a command as a string:
yabai::send("--focus space 2");
Send a command using the yabai::Command
type:
let command: yabai::Command = yabai::Command::FocusSpace(yabai::SpaceOption::Recent);
yabai::send_command(command)?;
Query yabai for display information:
let displays = yabai::query_displays()?;
Structs§
- Display
Info - Information about a display.
- Frame
- A rectangle representing the position and size of a window or display.
- Space
Info - Information about a mission control space.
- Window
Info - Information about a window.
Enums§
- Command
- An enum representing a command that can be sent to yabai.
- Direction
- An enum representing a cardinal direction.
- Focus
Space Option - An enum representing the options passed to the
space --focus
command. - Space
Rotation - An enum representing the options passed to the
space --rotate
command. - Yabai
Error - The main error type for errors returned by this crate.
Functions§
- focus_
space - focus_
window - query_
displays - Queries yabai for information about all displays.
- query_
spaces - Queries yabai for information about all spaces.
- query_
windows - Queries yabai for information about all windows.
- send
- Send a command to yabai as a string of space-separated arguments.
- send_
command - Send a
yabai::Command
to yabai.