pub struct I3BarBlock {Show 17 fields
pub full_text: String,
pub short_text: String,
pub color: Color,
pub background: Color,
pub border: Option<String>,
pub border_top: Option<usize>,
pub border_right: Option<usize>,
pub border_bottom: Option<usize>,
pub border_left: Option<usize>,
pub min_width: Option<I3BarBlockMinWidth>,
pub align: Option<I3BarBlockAlign>,
pub name: Option<String>,
pub instance: String,
pub urgent: Option<bool>,
pub separator: Option<bool>,
pub separator_block_width: Option<usize>,
pub markup: Option<String>,
}
Expand description
Represent block as described in https://i3wm.org/docs/i3bar-protocol.html
Fields§
§full_text: String
§short_text: String
§color: Color
§background: Color
§border: Option<String>
§border_top: Option<usize>
§border_right: Option<usize>
§border_bottom: Option<usize>
§border_left: Option<usize>
§min_width: Option<I3BarBlockMinWidth>
§align: Option<I3BarBlockAlign>
§name: Option<String>
This project uses name
field to uniquely identify each “logical block”. For example two
“config blocks” merged using merge_with_next
will have the same name
. This information
could be used by some bar frontends (such as i3bar-river
) and will be ignored by i3bar
and swaybar
.
instance: String
This project uses instance
field to uniquely identify each block and optionally a part
of the block, e.g. a “button”. The format is {block_id}:{optional_widget_name}
. This info
is used when dispatching click events.
urgent: Option<bool>
§separator: Option<bool>
§separator_block_width: Option<usize>
§markup: Option<String>
Trait Implementations§
source§impl Clone for I3BarBlock
impl Clone for I3BarBlock
source§fn clone(&self) -> I3BarBlock
fn clone(&self) -> I3BarBlock
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for I3BarBlock
impl Debug for I3BarBlock
source§impl Default for I3BarBlock
impl Default for I3BarBlock
Auto Trait Implementations§
impl Freeze for I3BarBlock
impl RefUnwindSafe for I3BarBlock
impl Send for I3BarBlock
impl Sync for I3BarBlock
impl Unpin for I3BarBlock
impl UnwindSafe for I3BarBlock
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.