Skip to content

Commit

Permalink
feat(espanso): add cryptography snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
montchr committed Nov 23, 2024
1 parent 38ed94d commit 4de9dd7
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions home/profiles/espanso/matches/crypt.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}
];
}
];
}

0 comments on commit 4de9dd7

Please sign in to comment.