Skip to content

Instantly share code, notes, and snippets.

@smeech
Created April 7, 2026 22:24
Show Gist options
  • Select an option

  • Save smeech/56bcdc849781db91ce39727e1ef94e4a to your computer and use it in GitHub Desktop.

Select an option

Save smeech/56bcdc849781db91ce39727e1ef94e4a to your computer and use it in GitHub Desktop.
[Toggle package] Two triggers to enable/disable a particular package. #espanso #bash
- trigger: ":sitelen_on"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: |
dir="$HOME/.config/espanso/match/packages/sitelen-pona"
if [ -f "$dir/_package.yml" ]; then
mv "$dir/_package.yml" "$dir/package.yml" && echo "sitelen pona enabled"
else
echo "already enabled (or file not found)"
fi
- trigger: ":sitelen_off"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: |
dir="$HOME/.config/espanso/match/packages/sitelen-pona"
if [ -f "$dir/package.yml" ]; then
mv "$dir/package.yml" "$dir/_package.yml" && echo "sitelen pona disabled"
else
echo "already disabled (or file not found)"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment