Skip to content

Instantly share code, notes, and snippets.

@shripadk
Created March 3, 2021 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shripadk/74ffffadf8d3bca8962f45812aec7e20 to your computer and use it in GitHub Desktop.
Save shripadk/74ffffadf8d3bca8962f45812aec7e20 to your computer and use it in GitHub Desktop.
espanso configuration file
# 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.
matches:
# Simple text replacement
- trigger: ":espanso"
replace: "Hi there!"
# Dates
- trigger: ":date"
word: true
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo `date '+%d-%m-%Y'`"
- trigger: ":today"
word: true
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo `date '+[[Journals/%d-%m-%Y|%d-%m-%Y]]'`"
- trigger: ":tom"
word: true
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo `date -v +1d '+[[Journals/%d-%m-%Y|%d-%m-%Y]]'`"
- trigger: ":yes"
word: true
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo `date -v -1d '+[[Journals/%d-%m-%Y|%d-%m-%Y]]'`"
- trigger: ":pn"
word: true
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "echo `date -v -1d '+[[Journals/%d-%m-%Y|Previous Day]]'`' | '`date -v +1d '+[[Journals/%d-%m-%Y|Next Day]]'`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment