WindTerm - Trigger
Quick Start
A trigger is an action that is automatically executed when the output received from a server matches specified text or regular expressions. Triggers help automate and streamline workflows in the terminal, increasing efficiency and reducing the need for manual intervention.
WindTerm
supports the following trigger types:
- Custom Link
- Custom Menu
- Event: Connection And Disconnection
- Highlight Text
- Play Sound
- Run Command
- Send Text
- Show Tooltip
WindTerm
also has the following built-in triggers to provide convenient functionality:
Regular Expression
WindTerm
supports using named capturing in the matching regular expression patterns, and captured groups can be referenced when generating the return value. For example, a Run Command
trigger can be used to launch vi
with the filename and line number based on a regular expression that includes two named groups:
Output | File “test.py”, line 5, in <module> |
---|---|
Regex | File “(?<file>\S+)”.*line (?<line>\d+) |
Command | vi ${file} +${line}\n |
Javascript
The trigger types such as Open Hyperlink
, Send Text
, and Show Tooltip
support using JavaScript to generate return values. The available JavaScript objects and functions can be referenced from:
WindTerm - Trigger / Custom Link
Quick Start
Custom Link
trigger supports marking the matched target string when it is matched and performing a specified action when the mouse clicks on the link. The default actions include: Open hyperlink
, Play sound
, Run command
, Send text
, etc.
The following built-in triggers are based on Custom Link
:
Intro Video
WindTerm - Trigger / Custom Menu
Quick Start
Custom Menu
trigger supports marking the matched target string when it is matched and displaying a menu when the mouse hovers over the string to perform a series of specified actions. The default actions include: Open hyperlink
, Play sound
, Run command
, Send text
, etc.
The following built-in trigger is based on Custom Menu
:
Intro Video
WindTerm - Trigger / Connection And Disconnection
Quick Start
Triggers such as Before connection
, Before disconnection
, After connection
, After disconnection
support performing specified actions when the events they represent occur, such as playing specified sounds when a session is successfully connected. The default actions include: Open hyperlink
, Play sound
, Run command
, Send text
, etc.