Struct i3ipc::I3Connection
[−]
[src]
pub struct I3Connection { /* fields omitted */ }
Abstraction over an ipc socket to i3. Handles messages/replies.
Methods
impl I3Connection
[src]
fn connect() -> Result<I3Connection, EstablishError>
Establishes the IPC connection.
fn command(&mut self, string: &str) -> Result<Command, MessageError>
The payload of the message is a command for i3 (like the commands you can bind to keys in the configuration file) and will be executed directly after receiving it.
fn get_workspaces(&mut self) -> Result<Workspaces, MessageError>
Gets the current workspaces.
fn get_outputs(&mut self) -> Result<Outputs, MessageError>
Gets the current outputs.
fn get_tree(&mut self) -> Result<Node, MessageError>
Gets the layout tree. i3 uses a tree as data structure which includes every container.
fn get_marks(&mut self) -> Result<Marks, MessageError>
Gets a list of marks (identifiers for containers to easily jump to them later).
fn get_bar_ids(&mut self) -> Result<BarIds, MessageError>
Gets an array with all configured bar IDs.
fn get_bar_config(&mut self, id: &str) -> Result<BarConfig, MessageError>
Gets the configuration of the workspace bar with the given ID.
fn get_version(&mut self) -> Result<Version, MessageError>
Gets the version of i3. The reply will include the major, minor, patch and human-readable version.