Script Expansion

PHOTO EMBED

Mon Dec 05 2022 20:28:47 GMT+0000 (Coordinated Universal Time)

Saved by @savabeh191

- trigger: ":pyscript"
  replace: "{{output}}"
  vars:
    - name: output
      type: script
      params:
        args:
          - python
          - "%CONFIG%/scripts/script.py"

content_copyCOPY

In this case we will use espanso to execute a external script, in this case we will run a python script There is a good practice mentioned in the official documentation The best-practice is to create a folder called scripts inside the directory espanso to store all the scripts to be use. Now, we use the %CONFIG% wildcard to automatically replace the configuration directory

https://cubevic.github.io/My_notes/Miscellaneous/Espanso.html