From 5391a73d455be4188e402bbecd674ad5a8d5131a Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Thu, 6 Mar 2025 17:05:38 -0800 Subject: [PATCH] :wrench: Added piecewise function latex alias --- .config/espanso/match/base.yml | 10 ++++++++++ scripts/piecewise | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100755 scripts/piecewise diff --git a/.config/espanso/match/base.yml b/.config/espanso/match/base.yml index f2c2917f..89d956f5 100644 --- a/.config/espanso/match/base.yml +++ b/.config/espanso/match/base.yml @@ -175,6 +175,16 @@ matches: force_clipboard: true replace: "$$ x = \\frac{-(b) \\pm \\sqrt{(b)^2 - 4(a)(c)}}{2(a)} $$" + # prints out latex piecewise function + - trigger: ";piece" + force_clipboard: true + replace: "{{output}}" + vars: + - name: output + type: shell + params: + cmd: "~/scripts/piecewise ; echo ''" + - trigger: "; " diff --git a/scripts/piecewise b/scripts/piecewise new file mode 100755 index 00000000..b0ce4a0b --- /dev/null +++ b/scripts/piecewise @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Utilize in conjunction with espanso, call ;html5 +cat <