490 lines
11 KiB
YAML
490 lines
11 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.
|
|
matches:
|
|
# Simple text replacement
|
|
- trigger: ":espanso"
|
|
force_clipboard: true
|
|
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"
|
|
force_clipboard: true
|
|
replace: "{{mydate}}"
|
|
vars:
|
|
- name: mydate
|
|
type: date
|
|
params:
|
|
format: "%m/%d/%Y"
|
|
|
|
# Print the output of a shell command
|
|
# - trigger: ":shell"
|
|
# replace: "{{output}}"
|
|
# vars:
|
|
# - name: output
|
|
# type: shell
|
|
# params:
|
|
# cmd: "echo 'Hello from your shell"
|
|
|
|
# Print the $USER
|
|
- trigger: ":user"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "echo $USER"
|
|
|
|
# Print the $HOST
|
|
- trigger: ":term"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "echo $TERM" # returns "linux"...
|
|
|
|
- trigger: ":shell"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "echo $SHELL"
|
|
|
|
- trigger: ":kernel"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "uname -r"
|
|
|
|
- trigger: ";cmm"
|
|
force_clipboard: true
|
|
replace: "/* *********************\n\n*********************/"
|
|
|
|
- trigger: ";cmh"
|
|
force_clipboard: true
|
|
replace: "########################\n\n#######################"
|
|
|
|
- trigger: ";rr"
|
|
force_clipboard: true
|
|
replace: "source $HOME/.sdrc && cd $sdir && nvim $sdoc"
|
|
|
|
- trigger: ";rd"
|
|
force_clipboard: true
|
|
replace: "source $HOME/.sdrc && cd $sdir && ls"
|
|
|
|
- trigger: ";forl"
|
|
force_clipboard: true
|
|
replace: "for (;;) {}"
|
|
|
|
- trigger: ";while"
|
|
force_clipboard: true
|
|
replace: "while () {}"
|
|
|
|
- trigger: ";if"
|
|
force_clipboard: true
|
|
replace: "if () {}"
|
|
|
|
- trigger: ";elif"
|
|
force_clipboard: true
|
|
replace: "else if () {}"
|
|
|
|
- trigger: ";else"
|
|
force_clipboard: true
|
|
replace: "else {}"
|
|
|
|
- trigger: ";do"
|
|
force_clipboard: true
|
|
replace: "do {} while ()"
|
|
|
|
- trigger: ";func"
|
|
force_clipboard: true
|
|
replace: "function () {}"
|
|
|
|
- trigger: ";=>"
|
|
force_clipboard: true
|
|
replace: "() => {}"
|
|
|
|
- trigger: ";try"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/trycatch ; echo ''"
|
|
|
|
- trigger: ";def"
|
|
force_clipboard: true
|
|
replace: "def():"
|
|
|
|
- trigger: ";fn"
|
|
force_clipboard: true
|
|
replace: "pub fn () {}"
|
|
|
|
- trigger: ";cll"
|
|
force_clipboard: true
|
|
replace: "console.log(' :=>', )"
|
|
|
|
- trigger: ";clc"
|
|
force_clipboard: true
|
|
replace: "console.clear()"
|
|
|
|
- trigger: ";cla"
|
|
force_clipboard: true
|
|
replace: "console.assert()"
|
|
|
|
- trigger: ";cle"
|
|
force_clipboard: true
|
|
replace: "console.error('ERROR :=>', )"
|
|
|
|
- trigger: ";clt"
|
|
force_clipboard: true
|
|
replace: "console.table()"
|
|
|
|
- trigger: ";clw"
|
|
force_clipboard: true
|
|
replace: "console.warn('WARNING :=>', )"
|
|
|
|
- trigger: ";$"
|
|
force_clipboard: true
|
|
replace: "$$ $$"
|
|
|
|
- trigger: ";frac"
|
|
force_clipboard: true
|
|
replace: "\\frac{}{}"
|
|
|
|
- trigger: ";quad"
|
|
force_clipboard: true
|
|
replace: "$$ x = \\frac{-(b) \\pm \\sqrt{(b)^2 - 4(a)(c)}}{2(a)} $$"
|
|
|
|
- trigger: ";slope"
|
|
force_clipboard: true
|
|
replace: "$$ m = \\frac{y_2 - y_1}{x_2 - x_1} $$"
|
|
|
|
- trigger: ";point"
|
|
force_clipboard: true
|
|
replace: "$$ y = y_1 + m(x - x_1) $$"
|
|
|
|
- trigger: ";form"
|
|
force_clipboard: true
|
|
replace: "$$ y = mx + b $$"
|
|
|
|
- trigger: ";circ"
|
|
force_clipboard: true
|
|
replace: "$$ (x - h)^2 + (y - k)^2 = r^2 $$"
|
|
|
|
- trigger: ";elli"
|
|
force_clipboard: true
|
|
replace: "$$ \\frac{(x - h)^2}{a^2} + \\frac{(y - k)^2}{b^2} = 1 $$"
|
|
|
|
- trigger: ";vert"
|
|
force_clipboard: true
|
|
replace: "$$ \\left(-\\frac{(b)}{2(a)}, f\\left(-\\frac{(b)}{2(a)}\\right)\\right) $$"
|
|
|
|
# prints out latex piecewise function
|
|
- trigger: ";piece"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/piecewise ; echo ''"
|
|
|
|
- trigger: ";align"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/align ; echo ''"
|
|
|
|
- trigger: ";matrix"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/matrix ; echo ''"
|
|
|
|
- trigger: ";<h1"
|
|
force_clipboard: true
|
|
replace: "<h1> </h1>"
|
|
|
|
- trigger: ";<h2"
|
|
force_clipboard: true
|
|
replace: "<h2> </h2>"
|
|
|
|
- trigger: ";<h3"
|
|
force_clipboard: true
|
|
replace: "<h3> </h3>"
|
|
|
|
- trigger: ";<h4"
|
|
force_clipboard: true
|
|
replace: "<h4> </h4>"
|
|
|
|
- trigger: ";<h5"
|
|
force_clipboard: true
|
|
replace: "<h5> </h5>"
|
|
|
|
- trigger: ";href"
|
|
force_clipboard: true
|
|
replace: '<a aria-label="" target="_blank" rel="noopener noreferrer" role="link" href=""></a>'
|
|
|
|
- trigger: ";<d"
|
|
force_clipboard: true
|
|
replace: '<div class=""> </div>'
|
|
|
|
- trigger: ";<s"
|
|
force_clipboard: true
|
|
replace: '<span class=""> </span>'
|
|
|
|
- trigger: ";<p"
|
|
force_clipboard: true
|
|
replace: "<p> </p>"
|
|
|
|
- trigger: ";<a"
|
|
force_clipboard: true
|
|
replace: '<a href=""> </a>'
|
|
|
|
- trigger: ";<i"
|
|
force_clipboard: true
|
|
replace: '<img src="" alt="" />'
|
|
|
|
- trigger: ";test"
|
|
force_clipboard: true
|
|
replace: "test('', () => {})"
|
|
|
|
- trigger: ";inc"
|
|
force_clipboard: true
|
|
replace: "#include"
|
|
|
|
- trigger: ";pri"
|
|
force_clipboard: true
|
|
replace: "print(' :=>', )"
|
|
|
|
- trigger: ";sh"
|
|
force_clipboard: true
|
|
replace: "#!/usr/bin/env bash"
|
|
|
|
- trigger: ";str"
|
|
force_clipboard: true
|
|
replace: "'use strict'"
|
|
|
|
- trigger: ";loc"
|
|
force_clipboard: true
|
|
replace: "localhost:"
|
|
|
|
- trigger: ";000"
|
|
force_clipboard: true
|
|
replace: "0.0.0.0:"
|
|
|
|
# Pings google dns server
|
|
- trigger: ";ping"
|
|
force_clipboard: true
|
|
replace: "ping 8.8.8.8"
|
|
|
|
# Prepares Odysee search
|
|
- trigger: "!ody"
|
|
force_clipboard: true
|
|
replace: "https://odysee.com/$/search?q="
|
|
|
|
# Prepares Quetre search
|
|
- trigger: "!que"
|
|
force_clipboard: true
|
|
replace: "https://qr.vern.cc/search?q="
|
|
|
|
# Prepares Stack Overflow search
|
|
- trigger: "!sto"
|
|
force_clipboard: true
|
|
replace: "https://stackoverflow.com/search?q="
|
|
|
|
# Routes to text.npr.org
|
|
- trigger: ";npr"
|
|
force_clipboard: true
|
|
replace: "https://text.npr.org"
|
|
|
|
# Routes to lite.pbs.org
|
|
- trigger: ";pbs"
|
|
force_clipboard: true
|
|
replace: "https://lite.pbs.org/"
|
|
|
|
# Prints out default Makefile flags
|
|
- trigger: ";make"
|
|
force_clipboard: true
|
|
replace: "CC=gcc\nCFLAGS=-Wall -Wextra -Werror -std=c99"
|
|
|
|
|
|
# Routes to ChatGPT
|
|
- trigger: ";gpt"
|
|
force_clipboard: true
|
|
replace: "https://chatgpt.com/"
|
|
|
|
# Routes to Excalidraw
|
|
- trigger: ";excal"
|
|
force_clipboard: true
|
|
replace: "https://excalidraw.com/"
|
|
|
|
# Routes to My Repos
|
|
- trigger: ";repos"
|
|
force_clipboard: true
|
|
replace: "https://github.com/tomit4?tab=repositories"
|
|
|
|
# Routes to Llama AI
|
|
- trigger: ";llama"
|
|
force_clipboard: true
|
|
replace: "https://www.llama2.ai/"
|
|
|
|
# Routes to Project Zomboid Map
|
|
- trigger: ";zmap"
|
|
force_clipboard: true
|
|
replace: "https://b42map.com/"
|
|
|
|
# Routes to Project Zomboid Wiki
|
|
- trigger: ";zwiki"
|
|
force_clipboard: true
|
|
replace:
|
|
"https://pzwiki.net/wiki/Project_Zomboid_Wiki"
|
|
|
|
# Prepares about pages for firefox
|
|
- trigger: ";conf"
|
|
force_clipboard: true
|
|
replace: "about:config"
|
|
- trigger: ";pref"
|
|
force_clipboard: true
|
|
replace: "about:preferences"
|
|
- trigger: ";prof"
|
|
force_clipboard: true
|
|
replace: "about:profiles"
|
|
- trigger: ";add"
|
|
force_clipboard: true
|
|
replace: "about:addons"
|
|
- trigger: ";mem"
|
|
force_clipboard: true
|
|
replace: "about:memory"
|
|
- trigger: ";trans"
|
|
force_clipboard: true
|
|
replace: "about:translations"
|
|
|
|
|
|
# Calling Bash Scripts
|
|
# Returns public ip address
|
|
- trigger: ";ip"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "curl ifconfig.me ; echo ''"
|
|
|
|
# returns default html5 layout
|
|
- trigger: ";html5"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/html5 ; echo ''"
|
|
|
|
# returns default react layout
|
|
- trigger: ";rfc"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/react ; echo ''"
|
|
|
|
|
|
# returns default vue layout
|
|
- trigger: ";vue"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/vue ; echo ''"
|
|
|
|
# returns default html5 layout
|
|
- trigger: ";php"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/php8 ; echo ''"
|
|
|
|
# returns default html5 layout in pug
|
|
- trigger: ";pug5"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/pug5 ; echo ''"
|
|
# returns default html5 layout
|
|
- trigger: ";kcss"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/kcss ; echo ''"
|
|
|
|
# returns default figure and img tags for pug blog
|
|
- trigger: ";fig"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/fig ; echo ''"
|
|
|
|
# returns single lorem ipsum text paragraph
|
|
- trigger: ";lorem"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/lorem ; echo ''"
|
|
|
|
# returns current time in US format
|
|
- trigger: ";btime"
|
|
force_clipboard: true
|
|
replace: "{{output}}"
|
|
vars:
|
|
- name: output
|
|
type: shell
|
|
params:
|
|
cmd: "~/scripts/btime ; echo ''"
|
|
# And much more! For more information, visit the docs: https://espanso.org/docs/
|