ReplaceTextAction¶
Inherits |
Replaces text in the currently focused text field.
Note
This action is currently only supported in the compositor plugin implementations and will only work in programs that support the Text Input Wayland protocol.
Configuration¶
Properties¶
Property |
Type |
|---|---|
replace_text |
TextSubstitutionRule¶
Property |
Type |
Description |
|---|---|---|
regex |
regex |
Regular expression executed on text before the cursor, on the same line. On a successful match, the |
replace |
string |
Text to replace the match with. Accepts dynamic values, evaluated asynchronously. |
Examples¶
replace_text:
# :calc{2+2} -> 4
- regex: :calc{(.*)}
replace:
command: printf "$(qalc -t "$match_1")"
# :email -> example@example.com
- regex: :email
replace: example@example.com