Struct lazybar_core::panels::Custom
source · pub struct Custom { /* private fields */ }
Expand description
Runs a custom command with sh -c <command>
, either once or on a given
interval.
Trait Implementations§
source§impl PanelConfig for Custom
impl PanelConfig for Custom
source§fn parse(
name: &'static str,
table: &mut HashMap<String, Value>,
global: &Config,
) -> Result<Self>
fn parse( name: &'static str, table: &mut HashMap<String, Value>, global: &Config, ) -> Result<Self>
Configuration options:
-
format
: the format string- type: String
- default:
%stdout%
- formatting options:
%stdout%
,%stderr%
-
command
: the command to run- type: String
- default: none
-
interval
: the amount of time in seconds to wait between runs- type: u64
- default: none
- if not present, the command will run exactly once.
-
See
PanelCommon::parse
.
source§fn props(&self) -> (&'static str, bool)
fn props(&self) -> (&'static str, bool)
Returns the name of the panel. If the panel supports events, each
instance must return a unique name.
source§fn run(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>
fn run( self: Box<Self>, cr: Rc<Context>, global_attrs: Attrs, height: i32, ) -> Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>
Performs any necessary setup, then returns a
PanelStream
representing the provided PanelConfig
. Read moreAuto Trait Implementations§
impl Freeze for Custom
impl !RefUnwindSafe for Custom
impl Send for Custom
impl Sync for Custom
impl Unpin for Custom
impl !UnwindSafe for Custom
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