BarConfig

Struct BarConfig 

Source
pub struct BarConfig {
    pub id: String,
    pub mode: String,
    pub position: String,
    pub status_command: String,
    pub font: String,
    pub workspace_buttons: bool,
    pub binding_mode_indicator: bool,
    pub verbose: bool,
    pub colors: HashMap<ColorableBarPart, String>,
}
Expand description

The reply to the get_bar_config request.

This can be used by third-party workspace bars (especially i3bar, but others are free to implement compatible alternatives) to get the bar block configuration from i3.

Fields§

§id: String

The ID for this bar. Included in case you request multiple configurations and want to differentiate the different replies.

§mode: String

Either dock (the bar sets the dock window type) or hide (the bar does not show unless a specific key is pressed).

§position: String

Either bottom or top at the moment.

§status_command: String

Command which will be run to generate a statusline. Each line on stdout of this command will be displayed in the bar. At the moment, no formatting is supported.

§font: String

The font to use for text on the bar.

§workspace_buttons: bool

Display workspace buttons or not? Defaults to true.

§binding_mode_indicator: bool

Display the mode indicator or not? Defaults to true.

§verbose: bool

Should the bar enable verbose output for debugging? Defaults to false.

§colors: HashMap<ColorableBarPart, String>

Contains key/value pairs of colors. Each value is a color code in hex, formatted #rrggbb (like in HTML).

Trait Implementations§

Source§

impl Debug for BarConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.