Add option to remove trigger word before script runs #1931
Replies: 2 comments
-
I agree it would be handy, although it's not too difficult to get around this particular use-case by adding repeated - trigger: :kp
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: |
xdotool key BackSpace BackSpace BackSpace type /h1
sleep 1.5
xdotool key Return type "HEADER WORDS HERE***" I think there are some environment variables, including one containing the trigger phrase, in the development pipeline, which would make it possible to do this programmatically. This would get around not knowing the length of |
Beta Was this translation helpful? Give feedback.
-
Thanks, yes I am currently adding extra characters with xdotool, for Espanso to delete them again. 👍 However, it seems a bit a hack to do it this way :-) |
Beta Was this translation helpful? Give feedback.
-
I have some scripts that use
xdotool
to send keystrokes. However, once the script has completed, Espanso tries to backspace the trigger word, interfering with my keystrokes.One solution could be to have an option for a match to remove the trigger before running the script. So:
:trg
<Backspace><Backspace><Backspace><Backspace>
Beta Was this translation helpful? Give feedback.
All reactions