Created
November 5, 2021 20:56
-
-
Save fernandotakai/d824d0f713871e0ae6b3fd8b855e0359 to your computer and use it in GitHub Desktop.
This file contains 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
# espanso configuration file | |
# This is the default configuration file, change it as you like it | |
# You can refer to the official documentation: | |
# https://espanso.org/docs/ | |
# Matches are the substitution rules, when you type the "trigger" string | |
# it gets replaced by the "replace" string. | |
enable_passive: true | |
passive_key: CTRL | |
matches: | |
# Simple text replacement | |
- trigger: ":espanso" | |
replace: "Hi there!" | |
- trigger: ":lawshell" | |
replace: "chamber exec lawyaw/prod/mystacksdev -- ./manage.py shell_plus" | |
- trigger: ":pshell" | |
replace: "chamber exec lawyaw/prod/mystacksdev -- ./manage.py shell_plus" | |
- trigger: ":sshell" | |
replace: "chamber exec lawyaw/staging/mystacksdev -- ./manage.py shell_plus" | |
# Dates | |
- trigger: ":date" | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%d/%m/%Y" | |
- trigger: ":shelldate" | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%Y%m%d%H%M" | |
- trigger: ":timestamp" | |
replace: "{{timestamp}}" | |
vars: | |
- name: timestamp | |
type: date | |
params: | |
format: "%s" | |
# random utilities | |
- trigger: ":uuid" | |
replace: "{{output}}" | |
vars: | |
- name: output | |
type: shell | |
params: | |
cmd: uuidgen | |
- trigger: ":externalip" | |
replace: "{{output}}" | |
vars: | |
- name: output | |
type: shell | |
params: | |
cmd: http ipinfo.io | jq '.ip' | |
# Shell commands | |
#- trigger: ":shell" | |
#replace: "{{output}}" | |
#vars: | |
#- name: output | |
#type: shell | |
#params: | |
#cmd: "echo Hello from your shell" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment