diff --git a/home/profiles/espanso/matches/crypt.nix b/home/profiles/espanso/matches/crypt.nix new file mode 100644 index 00000000..a07e3127 --- /dev/null +++ b/home/profiles/espanso/matches/crypt.nix @@ -0,0 +1,51 @@ +{ + matches = [ + { + trigger = ";;uuid"; + replace = "{{output}}"; + vars = [ + { + name = "output"; + type = "shell"; + vars = { + cmd = "uuidgen -r"; + }; + } + ]; + } + { + trigger = ";e;b64u"; + replace = "{{output}}"; + vars = [ + { + name = "clip"; + type = "clipboard"; + } + { + name = "output"; + type = "shell"; + params = { + cmd = "echo -n \"{{clip}}\" | basenc --base64url"; + }; + } + ]; + } + { + trigger = ";d;b64u"; + replace = "{{output}}"; + vars = [ + { + name = "clip"; + type = "clipboard"; + } + { + name = "output"; + type = "shell"; + params = { + cmd = "echo -n \"{{clip}}\" | basenc --decode --base64url"; + }; + } + ]; + } + ]; +}