[][src]Struct i3ipc::I3Connection

pub struct I3Connection { /* fields omitted */ }

Abstraction over an ipc socket to i3. Handles messages/replies.

Methods

impl I3Connection[src]

pub fn connect() -> Result<I3Connection, EstablishError>[src]

Establishes the IPC connection.

pub fn command(&mut self, string: &str) -> Result<Command, MessageError>[src]

Deprecated since 0.8.0:

Renamed to run_command

pub fn run_command(&mut self, string: &str) -> Result<Command, MessageError>[src]

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.

pub fn get_workspaces(&mut self) -> Result<Workspaces, MessageError>[src]

Gets the current workspaces.

pub fn get_outputs(&mut self) -> Result<Outputs, MessageError>[src]

Gets the current outputs.

pub fn get_tree(&mut self) -> Result<Node, MessageError>[src]

Gets the layout tree. i3 uses a tree as data structure which includes every container.

pub fn get_marks(&mut self) -> Result<Marks, MessageError>[src]

Gets a list of marks (identifiers for containers to easily jump to them later).

pub fn get_bar_ids(&mut self) -> Result<BarIds, MessageError>[src]

Gets an array with all configured bar IDs.

pub fn get_bar_config(&mut self, id: &str) -> Result<BarConfig, MessageError>[src]

Gets the configuration of the workspace bar with the given ID.

pub fn get_version(&mut self) -> Result<Version, MessageError>[src]

Gets the version of i3. The reply will include the major, minor, patch and human-readable version.

pub fn get_binding_modes(&mut self) -> Result<BindingModes, MessageError>[src]

This is supported on feature="i3-4-13" only.

Gets the list of currently configured binding modes.

pub fn get_config(&mut self) -> Result<Config, MessageError>[src]

This is supported on feature="i3-4-14" only.

Returns the last loaded i3 config.

Trait Implementations

impl Debug for I3Connection[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]