Crate yabai

source ·
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§

  • Information about a display.
  • A rectangle representing the position and size of a window or display.
  • Information about a mission control space.
  • Information about a window.

Enums§

  • An enum representing a command that can be sent to yabai.
  • An enum representing a cardinal direction.
  • An enum representing the options passed to the space --focus command.
  • An enum representing the options passed to the space --rotate command.
  • The main error type for errors returned by this crate.

Functions§