From 5185fd223ba19530a3ef2e477a71755e5811f759 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Thu, 22 Jun 2023 18:02:19 -0700 Subject: [PATCH] :sparkles: Setting up more espanso shortcuts for blog --- .config/espanso/match/base.yml | 23 +++++++++++++++++++---- scripts/fig | 7 +++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100755 scripts/fig diff --git a/.config/espanso/match/base.yml b/.config/espanso/match/base.yml index 7eedd9cd..8cc92502 100644 --- a/.config/espanso/match/base.yml +++ b/.config/espanso/match/base.yml @@ -68,9 +68,6 @@ matches: params: cmd: "uname -r" - - trigger: ";lorem" - replace: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." - - trigger: ";cmm" replace: "/* *********************\n\n*********************/" @@ -162,7 +159,7 @@ matches: replace: ' ' - trigger: ";

' + replace: "

" - trigger: "; ' @@ -244,6 +241,24 @@ matches: params: cmd: "~/scripts/pug5 ; echo ''" + # returns default figure and img tags for pug blog + - trigger: ";fig" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: "~/scripts/fig ; echo ''" + + # returns single lorem ipsum text paragraph + - trigger: ";lorem" + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: "~/scripts/lorem ; echo ''" + # returns current time in US format - trigger: ";btime" replace: "{{output}}" diff --git a/scripts/fig b/scripts/fig new file mode 100755 index 00000000..fda2a373 --- /dev/null +++ b/scripts/fig @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Utilize in conjunction with espanso, call ;fig +cat <