From 07d45dde36d45ed73986613bff5243a339ac8e23 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Fri, 17 Mar 2023 09:00:54 -0400 Subject: [PATCH] Updating espanso configuration to new format --- espanso/espanso/default.yml | 52 ------------------------ espanso/espanso/match/base.yml | 56 +++----------------------- espanso/espanso/match/date.yml | 19 +++++++++ espanso/espanso/match/email.yml | 11 +++++ espanso/espanso/match/housecallpro.yml | 12 ++++++ espanso/espanso/match/links.yml | 17 ++++++++ 6 files changed, 64 insertions(+), 103 deletions(-) delete mode 100644 espanso/espanso/default.yml create mode 100644 espanso/espanso/match/date.yml create mode 100644 espanso/espanso/match/email.yml create mode 100644 espanso/espanso/match/housecallpro.yml create mode 100644 espanso/espanso/match/links.yml diff --git a/espanso/espanso/default.yml b/espanso/espanso/default.yml deleted file mode 100644 index d877716..0000000 --- a/espanso/espanso/default.yml +++ /dev/null @@ -1,52 +0,0 @@ -# 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" - replace: "{{mydate}}" - vars: - - name: mydate - type: date - params: - format: "%m/%d/%Y" - - # Shell commands - - trigger: ":shell" - replace: "{{output}}" - vars: - - name: output - type: shell - params: - cmd: "echo Hello from your shell" - - # Email - - trigger: ":@m" - replace: "mhoush@houshhomeenergy.com" - - trigger: ":@h" - replace: "@houshhomeenergy.com" - - trigger: ":@s" - replace: "service@houshhomeenergy.com" - - # Iso-seconds - - trigger: ":isosec" - replace: "{{output}}" - vars: - - name: output - type: shell - params: - cmd: "isosec" - - # Youtube - - trigger: ":yt" - replace: "https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA" - diff --git a/espanso/espanso/match/base.yml b/espanso/espanso/match/base.yml index f671b22..4588913 100644 --- a/espanso/espanso/match/base.yml +++ b/espanso/espanso/match/base.yml @@ -1,62 +1,16 @@ # 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" - replace: "Hi there!" - # NOTE: espanso uses YAML to define matches, so pay attention to the indentation! +imports: + - "./date.yml" + - "./email.yml" + - "./housecallpro.yml" + - "./links.yml" - # But matches can also be dynamic: - - # Print the current date - - trigger: ":date" - replace: "{{mydate}}" - vars: - - name: mydate - type: date - params: - format: "%m/%d/%Y" - - # Email - - trigger: ":@hhe" - replace: "mhoush@houshhomeenergy.com" - - trigger: ":@service" - replace: "service@houshhomeenergy.com" - - trigger: ":@me" - replace: "michael@mhoush.com" - - # House Call Pro - - trigger: ":cc" - replace: "Client Concern" - - trigger: ":diag" - replace: "Diagnostic" - - trigger: ":wd" - replace: "Work Description" - - trigger: ":wp" # I often mistype for this. - replace: "Work Description" - - # Iso-seconds - - trigger: ":isosec" - replace: "{{output}}" - vars: - - name: output - type: shell - params: - cmd: "isosec" - - # Youtube - - trigger: ":yt" - replace: "https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA" - - # Discord - - trigger: ":discord" - replace: "https://discord.gg/W3p5GJfjry" diff --git a/espanso/espanso/match/date.yml b/espanso/espanso/match/date.yml new file mode 100644 index 0000000..56dcf3e --- /dev/null +++ b/espanso/espanso/match/date.yml @@ -0,0 +1,19 @@ +matches: + # Print the current date + - trigger: ":date" + replace: "{{mydate}}" + vars: + - name: mydate + type: date + params: + format: "%m/%d/%Y" + + # Iso-seconds + - trigger: ":isosec" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: "isosec" + diff --git a/espanso/espanso/match/email.yml b/espanso/espanso/match/email.yml new file mode 100644 index 0000000..2ca9009 --- /dev/null +++ b/espanso/espanso/match/email.yml @@ -0,0 +1,11 @@ +# Email configuration. + +matches: + # Email Addresses + - trigger: ":@hhe" + replace: "mhoush@houshhomeenergy.com" + - trigger: ":@service" + replace: "service@houshhomeenergy.com" + - trigger: ":@me" + replace: "michael@mhoush.com" + diff --git a/espanso/espanso/match/housecallpro.yml b/espanso/espanso/match/housecallpro.yml new file mode 100644 index 0000000..9331018 --- /dev/null +++ b/espanso/espanso/match/housecallpro.yml @@ -0,0 +1,12 @@ +# Commonly used in house call pro. +matches: + # House Call Pro + - trigger: ":cc" + replace: "Client Concern" + - trigger: ":diag" + replace: "Diagnostic" + - trigger: ":wd" + replace: "Work Description" + - trigger: ":wp" # I often mistype for this. + replace: "Work Description" + diff --git a/espanso/espanso/match/links.yml b/espanso/espanso/match/links.yml new file mode 100644 index 0000000..e03b083 --- /dev/null +++ b/espanso/espanso/match/links.yml @@ -0,0 +1,17 @@ +# This file includes common url's / links. +matches: + # Github + - trigger: ":git" + replace: "https://github.com/m-housh" + + - trigger: ":pf" + replace: "https://pointfree.co" + + # Youtube + - trigger: ":yt" + replace: "https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA" + + # Discord + - trigger: ":discord" + replace: "https://discord.gg/W3p5GJfjry" +