pub enum TriggerActionConfig {
Highlight {
fg: Option<[u8; 3]>,
bg: Option<[u8; 3]>,
duration_ms: u64,
},
Notify {
title: String,
message: String,
},
MarkLine {
label: Option<String>,
color: Option<[u8; 3]>,
},
SetVariable {
name: String,
value: String,
},
RunCommand {
command: String,
args: Vec<String>,
},
PlaySound {
sound_id: String,
volume: u8,
},
SendText {
text: String,
delay_ms: u64,
},
SplitPane {
direction: TriggerSplitDirection,
command: Option<SplitPaneCommand>,
focus_new_pane: bool,
target: TriggerSplitTarget,
split_percent: u8,
},
}Expand description
An action fired when a trigger pattern matches terminal output.
Each variant represents a different type of response to matched output,
from visual highlighting to command execution. Actions marked as “dangerous”
require explicit user confirmation unless prompt_before_run: false is set.
Variants§
Highlight
Highlight matched text with a temporary color overlay.
Notify
Show a desktop notification with a title and message.
MarkLine
Mark the line containing the match with a colored indicator in the scrollback.
SetVariable
Set an internal variable that can be referenced by other triggers or snippets.
RunCommand
Run an external command (dangerous when prompt_before_run: false).
PlaySound
Play an alert sound.
SendText
Send text to the terminal as if typed by the user (dangerous when prompt_before_run: false).
SplitPane
Open a new pane (horizontal or vertical split) and optionally run a command in it.
Fields
direction: TriggerSplitDirectioncommand: Option<SplitPaneCommand>target: TriggerSplitTargetImplementations§
Source§impl TriggerActionConfig
impl TriggerActionConfig
Sourcepub fn is_dangerous(&self) -> bool
pub fn is_dangerous(&self) -> bool
Returns true if this action is considered dangerous when triggered by passive terminal output (i.e., without explicit user interaction).
Dangerous actions: RunCommand, SendText, SplitPane
Safe actions: Highlight, Notify, MarkLine, SetVariable, PlaySound
Trait Implementations§
Source§impl Clone for TriggerActionConfig
impl Clone for TriggerActionConfig
Source§fn clone(&self) -> TriggerActionConfig
fn clone(&self) -> TriggerActionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TriggerActionConfig
impl Debug for TriggerActionConfig
Source§impl<'de> Deserialize<'de> for TriggerActionConfig
impl<'de> Deserialize<'de> for TriggerActionConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TriggerActionConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TriggerActionConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TriggerActionConfig
impl PartialEq for TriggerActionConfig
Source§impl Serialize for TriggerActionConfig
impl Serialize for TriggerActionConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for TriggerActionConfig
Auto Trait Implementations§
impl Freeze for TriggerActionConfig
impl RefUnwindSafe for TriggerActionConfig
impl Send for TriggerActionConfig
impl Sync for TriggerActionConfig
impl Unpin for TriggerActionConfig
impl UnsafeUnpin for TriggerActionConfig
impl UnwindSafe for TriggerActionConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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