pub enum EventType {
Show 32 variants
WindowCreated,
WindowClosed,
WindowFocusChanged,
WindowResized,
WindowConfigReloaded,
GuiStartup,
TabCreated,
TabClosed,
TabSwitched,
NewTabButtonClick,
PaneCreated,
PaneClosed,
PaneFocused,
PaneTitleChanged,
Bell,
SelectionChanged,
UserVarChanged,
OpenUri,
ScrollbackCleared,
UpdateStatus,
UpdateRightStatus,
UpdateLeftStatus,
FormatTabTitle,
FormatWindowTitle,
Output,
Input,
PreCommand,
PostCommand,
Resize,
Attach,
Detach,
Custom(String),
}Expand description
Event type enumeration
Defines all events that plugins can subscribe to. Events are organized into categories: window, tab, pane, terminal, and status events.
Variants§
WindowCreated
Fired when a new window is created
WindowClosed
Fired when a window is closed
WindowFocusChanged
Fired when window focus changes (gained or lost)
WindowResized
Fired when a window is resized
WindowConfigReloaded
Fired when configuration is reloaded
GuiStartup
Fired once when the GUI starts up (before first window)
TabCreated
Fired when a new tab is created
TabClosed
Fired when a tab is closed
TabSwitched
Fired when the active tab changes
NewTabButtonClick
Fired when the user clicks the “new tab” button
PaneCreated
Fired when a new pane is created (split)
PaneClosed
Fired when a pane is closed
PaneFocused
Fired when a pane gains focus
PaneTitleChanged
Fired when a pane’s title changes
Bell
Fired when the terminal bell is rung
SelectionChanged
Fired when the text selection changes
UserVarChanged
Fired when a user-defined variable changes (OSC 1337)
OpenUri
Fired when a clickable URI is detected
ScrollbackCleared
Fired when the scrollback buffer is cleared
UpdateStatus
Request to update the status bar
UpdateRightStatus
Request to update the right status section
UpdateLeftStatus
Request to update the left status section
FormatTabTitle
Request to format a tab title (return formatted string)
FormatWindowTitle
Request to format the window title (return formatted string)
Output
Terminal output (maps to HookType::PreOutput)
Input
User input (maps to HookType::PostInput)
PreCommand
Before command execution (maps to HookType::PreCommand)
PostCommand
After command execution (maps to HookType::PostCommand)
Resize
Terminal resize (maps to HookType::OnResize)
Attach
Client attached (maps to HookType::OnAttach)
Detach
Client detached (maps to HookType::OnDetach)
Custom(String)
User-defined custom event
Allows plugins to emit and listen for custom events with arbitrary names.
For example, Custom("git-status-changed") or Custom("test-completed").
Implementations§
Source§impl EventType
impl EventType
Sourcepub fn is_window_event(&self) -> bool
pub fn is_window_event(&self) -> bool
Check if this is a window-related event
Sourcepub fn is_tab_event(&self) -> bool
pub fn is_tab_event(&self) -> bool
Check if this is a tab-related event
Sourcepub fn is_pane_event(&self) -> bool
pub fn is_pane_event(&self) -> bool
Check if this is a pane-related event
Sourcepub fn is_terminal_event(&self) -> bool
pub fn is_terminal_event(&self) -> bool
Check if this is a terminal interaction event
Sourcepub fn is_status_event(&self) -> bool
pub fn is_status_event(&self) -> bool
Check if this is a status/formatting event
Sourcepub fn is_legacy_event(&self) -> bool
pub fn is_legacy_event(&self) -> bool
Check if this is a legacy hook event
Sourcepub fn is_custom_event(&self) -> bool
pub fn is_custom_event(&self) -> bool
Check if this is a custom event
Sourcepub fn all_standard() -> Vec<EventType>
pub fn all_standard() -> Vec<EventType>
Get all standard (non-custom) event types
Sourcepub fn from_hook_type(hook_type: HookType) -> Self
pub fn from_hook_type(hook_type: HookType) -> Self
Convert from legacy HookType to EventType
Sourcepub fn to_hook_type(&self) -> Option<HookType>
pub fn to_hook_type(&self) -> Option<HookType>
Try to convert EventType to legacy HookType (returns None for new events)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for EventType
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnsafeUnpin for EventType
impl UnwindSafe for EventType
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.