pub struct SwiftBar(_);
Expand description
A type-safe handle for SwiftBar-specific features.
Some SwiftBar-specific features are currently unsupported:
- Script metadata is unsupported since
cargo
does not support adding metadata to binaries it produces. You will have to add any metadata viaxattr
.
Implementations
Checks whether the plugins is running in SwiftBar by checking environment variables. If it does, returns a handle allowing use of SwiftBar-specific features.
This is supported on crate feature assume-flavor
only.
assume-flavor
only.Returns a handle allowing use of SwiftBar-specific features without checking whether the plugin is actually running inside SwiftBar. If the plugin is actually running in a different implementation, this may lead to incorrect behavior.
Returns the SwiftBar version on which the plugin is running by checking environment variables.
Unlike BitBar, SwiftBar supports more than 5 parameters for bash=
commands.
Returns a Color
that renders differently depending on whether the system is in dark mode.
Adds a SF Symbols image to a menu item.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SwiftBar
impl UnwindSafe for SwiftBar
Blanket Implementations
Mutably borrows from an owned value. Read more
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more