You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Event selectors allow temporary theme overrides that trigger on terminal events. These enable reactive animations like changing sprites on command failure, flashing on bell, etc.
Available Event Selectors
Selector
Trigger
Description
:terminal::on-bell
Bell character (\a)
Alert/notification sound
:terminal::on-command-success
Exit code 0
Command completed successfully
:terminal::on-command-fail
Exit code != 0
Command failed
:terminal::on-focus
Window focused
Terminal gained focus
:terminal::on-blur
Window blurred
Terminal lost focus
Event Properties
Property
Type
Default
Description
--duration
duration
500ms
How long the override lasts
Overridable Properties
Within event selectors, you can override:
Theme colors: color, background, text-shadow
Cursor: cursor-color
Sprite patches: All --sprite-* properties
Effect patches: All --starfield-*, --particles-*, --grid-*, --rain-*, --matrix-*, --shape-* properties
Note on sprite paths: All --sprite-path values (both base and event overrides) are resolved relative to the theme directory. If your base sprite is sprites/idle.png, use sprites/alert.png for event overrides to load from the same subdirectory.
Duration Behavior
Non-zero duration: Override applies for specified time, then reverts
Zero duration (--duration: 0ms): Persists until cleared by another event (used for ::on-blur)
Example: Reactive Sprite Theme
:terminal::backdrop {
/* Default sprite */--sprite-enabled: true;
--sprite-path:"character_idle.png";
--sprite-frame-width:64;
--sprite-frame-height:64;
--sprite-columns:4;
--sprite-fps:8;
}
/* Show happy sprite on success */:terminal::on-command-success {
--duration:1500ms;
--sprite-path:"character_happy.png";
--sprite-opacity:0.8;
text-shadow:0020pxrgba(0,255,0,0.6);
}
/* Show sad sprite on failure */:terminal::on-command-fail {
--duration:3000ms;
--sprite-path:"character_sad.png";
--sprite-opacity:0.6;
text-shadow:0020pxrgba(255,0,0,0.6);
}
/* Alert animation on bell */:terminal::on-bell {
--duration:800ms;
--sprite-path:"character_alert.png";
--sprite-fps:12;
}
/* Dim when unfocused */:terminal::on-blur {
--duration:0ms; /* Persist until focused */--sprite-opacity:0.3;
color:rgba(200,200,200,0.7);
}
Shell Integration Requirements
Command success/failure detection requires OSC 133 semantic prompt support in your shell. See How to Set Up Reactive Themes for setup instructions.
UI Selectors
:terminal::ui-focus Properties
Focus ring styling applied when the terminal window has keyboard focus.
Property
Type
Description
--ring-color
color
Focus ring color
--ring-thickness
number, px
Ring thickness
--glow-color
color
Focus glow color
--glow-size
number, px
Glow blur size
:terminal::ui-hover Properties
Hover state applied when the cursor is over interactive UI elements.