Simple prompt for espanso https://espanso.org/ on macOS
For the time being, espanso does not come with a graphical user interface, in the meanwhile you can use this workaround to prompt for text or select result in a list, on macOS.
Create a folder scripts
in the espanso preferences folder and copy these files: /Users/<username>/Preferences/espanso/scripts/
.
You can also copy Pashua app app into this folder.
- trigger: ":test"
replace: "Bonjour {{genre}} {{nom}}, vous aimez {{activity}}."
vars:
- name: genre
type: shell
params:
cmd: "$CONFIG/scripts/select.sh -l Genre -o \"Mr:Mme:Melle\""
trim: true
- name: nom
type: shell
params:
cmd: "$CONFIG/scripts/textfield.sh -l \"Votre prénom\" -p \"John Snow\""
trim: true
- name: activity
type: shell
params:
cmd: "$CONFIG/scripts/select.sh -l \"Activité préférée:\" -o \"dormir sous les étoiles:faire une ballade à cheval:danser sous la pluie\""
trim: true
The $CONFIG
variable here has been added to the launch agent as an environment variable: ~/Library/LaunchAgents/com.federicoterzi.espanso.plist
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>CONFIG</key>
<string>/Users/<username>/Library/Preferences/espanso</string>
</dict>
...
</dict>
I noticed a few imprecisions:
/Users/<username>/Library/Preferences/espanso/scripts
.chmod +x *.sh
on the scripts.You can also copy Pashua app app into this folder.
should be changed toIt is required to copy Pashua into this folder
.Thanks for the great work though ! 👍