Last active
August 8, 2025 18:50
-
-
Save smeech/53fe4ae0d91e645200337f43099bf578 to your computer and use it in GitHub Desktop.
[Encrypted expansion] A working Espanso trigger that securely decrypts a string (such as an address) using a password prompt, and expands it into your target app. First encrypt your address (once only) and store it securely: `echo "123 Fake Street, Faketown, FK1 2AB" | gpg -c -o ~/.secrets/homeaddr.gpg` ensuring the target directory exists first…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First encrypt your address (once only) and store it securely: | |
# `echo "123 Fake Street, Faketown, FK1 2AB" | gpg -c -o ~/.secrets/homeaddr.gpg` | |
# ensuring the target directory exists first. | |
matches: | |
- trigger: ":homeaddr" | |
replace: "{{address}}" | |
vars: | |
- name: address | |
type: script | |
params: | |
args: | |
- bash | |
- -c | |
- | | |
source ~/.zshrc 2>/dev/null || true | |
PASSWORD="$(zenity --password --title='Decrypt Address')" | |
[ -z "$PASSWORD" ] && exit 1 | |
echo "$PASSWORD" | gpg --batch --yes --passphrase-fd 0 --decrypt ~/.secrets/homeaddr.gpg 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment