dotfiles/espanso/.config/espanso/match/base.yml
2025-05-12 20:29:08 -06:00

142 lines
3.1 KiB
YAML

# espanso match file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the base matches (aka snippets)
# that will be available in every application when using espanso.
# Matches are substitution rules: when you type the "trigger" string
# it gets replaced by the "replace" string.
# yaml-language-server: $schema=https://raw.githubusercontent.com/espanso/espanso/dev/schemas/match.schema.json
matches:
# Simple text replacement
- trigger: ":espanso"
replace: "Hi there!"
# NOTE: espanso uses YAML to define matches, so pay attention to the indentation!
# But matches can also be dynamic:
# Print the current date
- trigger: ":date"
replace: "{{mydate}}"
vars:
- name: mydate
type: date
params:
format: "%m/%d/%Y"
- trigger: ":dt"
replace: "{{date}} {{time}}"
vars:
- name: date
type: date
params:
format: "%m/%d/%Y"
- name: time
type: time
params:
format: "%H:%M:%S"
# Print the output of a shell command
- trigger: ":shell"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo 'Hello from your shell'"
- trigger: :trigger
replace: |
- trigger: test
replace: test
- trigger: :test
replace: >
This is an example
of how to use a multi-
line example of :test
- trigger: ":easy"
replace: "This is easy!"
- trigger: :sno
replace: |
# Title
## Installation
/code
## Usage
/code
## Resources
- trigger: :meat
replace: 🥩
search_terms:
- steak
- t-bone
- regex: ";no.spons\\((?P<product>.*)\\)"
replace: |
Hi there,
Thanks for reaching out! However, I don't believe {{product}} is a good fit for my audience at this point, and my ethics statement (https://nicolevanderhoeven.com/ethics/), as well as my limited time, prohibits me from accpting most opportunities. I hope you understand!
I wish you the best of luck in finding someone who is a better fit.
Thank you,
Nicole
- trigger: ":uuid"
replace: "{{uuid}}"
vars:
- name: uuid
type: shell
params:
cmd: "uuidgen"
- trigger: ":now"
replace: "{{now}}"
vars:
- name: now
type: date
params:
format: "%Y-%m-%d %H:%M"
- trigger: ":clip-clean"
replace: "{{clip | replace('\n', ' ')}}"
vars:
- name: clip
type: shell
params:
cmd: "xclip -o -selection clipboard"
- trigger: ":randnum"
replace: "{{rand}}"
vars:
- name: rand
type: shell
params:
cmd: "shuf -i 1000-9999 -n 1"
- trigger: ":logentry"
replace: |
## Log - :now
**What happened:**
-
**Next actions:**
-
vars:
- name: now
type: date
params:
format: "%Y-%m-%d %H:%M"
# And much more! For more information, visit the docs: https://espanso.org/docs/