feat: cleaned up espanso

This commit is contained in:
Nick 2025-05-31 20:44:18 -05:00
parent 0ddf9cd1ce
commit 3d6ee99ecb
9 changed files with 91 additions and 142 deletions

View file

@ -0,0 +1,6 @@
{ matchHelper, ... }:
[
(matchHelper ":dag1" "")
(matchHelper ":dag2" "")
(matchHelper ":glp" "GLP-1RA")
]

View file

@ -0,0 +1,7 @@
{ matchHelper, ... }:
[
(matchHelper ":up" "")
(matchHelper ":down" "")
(matchHelper ":left" "")
(matchHelper ":right" "")
]

View file

@ -0,0 +1,6 @@
{ matchHelper, ... }:
[
(matchHelper ":delta" "Δ")
(matchHelper ":emdash" "")
(matchHelper ":degree" "°")
]

View file

@ -0,0 +1,8 @@
{ matchHelper, ... }:
[
(matchHelper ":ntt" ''
World A) Animals farmed for food.
World B) Humans farmed for food.
All else equal, what is true of world A that is untrue of world B, that if made true of world B, would make world B permissible?'')
]

View file

@ -0,0 +1,9 @@
{ flake, matchHelper, ... }:
let
inherit (flake.config.people) user0;
inherit (flake.config.people.users.${user0}) email;
in
[
(matchHelper ":mail0" email.address0)
(matchHelper ":mail1" email.address2)
]

View file

@ -0,0 +1,11 @@
{ matchHelper, ... }:
[
(matchHelper ":neg" "¬")
(matchHelper ":conj" "")
(matchHelper ":disj" "")
(matchHelper ":imp" "")
(matchHelper ":bicon" "")
(matchHelper ":forall" "")
(matchHelper ":exist" "")
(matchHelper ":therefore" "")
]

View file

@ -0,0 +1,13 @@
{ matchHelper, ... }:
[
(matchHelper ":ss1" "¹")
(matchHelper ":ss2" "²")
(matchHelper ":ss3" "³")
(matchHelper ":ss4" "")
(matchHelper ":ss5" "")
(matchHelper ":ss6" "")
(matchHelper ":ss7" "")
(matchHelper ":ss8" "")
(matchHelper ":ss9" "")
(matchHelper ":ss0" "")
]

View file

@ -0,0 +1,10 @@
{ flake, matchHelper, ... }:
let
inherit (flake.config.services.instances) forgejo mastodon web;
in
[
(matchHelper ":dotfiles" "https://gitlab.com/upRootNutrition/dotfiles")
(matchHelper ":website" "https://${web.domains.url3}")
(matchHelper ":forgejo" "https://${forgejo.subdomain}.${web.domains.url3}")
(matchHelper ":mastodon" "https://${mastodon.subdomain}.${web.domains.url3}")
]

View file

@ -4,8 +4,26 @@
...
}:
let
inherit (flake.config.people) user0;
inherit (flake.config.people.users.${user0}) email;
matchHelper = trigger: replace: {
trigger = trigger;
replace = replace;
};
configPath = ./config;
baseMatches = {
matches =
[ ]
++ (import (configPath + /base.nix) { inherit matchHelper; })
++ (import (configPath + /url.nix) { inherit flake matchHelper; })
++ (import (configPath + /logic.nix) { inherit matchHelper; })
++ (import (configPath + /debate.nix) { inherit matchHelper; })
++ (import (configPath + /characters.nix) { inherit matchHelper; })
++ (import (configPath + /academic.nix) { inherit matchHelper; })
++ (import (configPath + /superscript.nix) { inherit matchHelper; })
++ (import (configPath + /email.nix) { inherit flake matchHelper; });
};
in
{
services.espanso = {
@ -18,146 +36,7 @@ in
};
package = pkgs.espanso-wayland;
matches = {
base = {
matches = [
{
trigger = ":up";
replace = "";
}
{
trigger = ":down";
replace = "";
}
{
trigger = ":left";
replace = "";
}
{
trigger = ":right";
replace = "";
}
{
trigger = ":neg";
replace = "¬";
}
{
trigger = ":conj";
replace = "";
}
{
trigger = ":disj";
replace = "";
}
{
trigger = ":imp";
replace = "";
}
{
trigger = ":bicon";
replace = "";
}
{
trigger = ":forall";
replace = "";
}
{
trigger = ":exist";
replace = "";
}
{
trigger = ":therefore";
replace = "";
}
{
trigger = ":delta";
replace = "Δ";
}
{
trigger = ":emdash";
replace = "";
}
{
trigger = ":dag1";
replace = "";
}
{
trigger = ":dag2";
replace = "";
}
{
trigger = ":glp";
replace = "GLP-1RA";
}
{
trigger = ":degree";
replace = "°";
}
{
trigger = ":ss1";
replace = "¹";
}
{
trigger = ":ss2";
replace = "²";
}
{
trigger = ":ss3";
replace = "³";
}
{
trigger = ":ss4";
replace = "";
}
{
trigger = ":ss5";
replace = "";
}
{
trigger = ":ss6";
replace = "";
}
{
trigger = ":ss7";
replace = "";
}
{
trigger = ":ss8";
replace = "";
}
{
trigger = ":ss9";
replace = "";
}
{
trigger = ":ss0";
replace = "";
}
{
trigger = ":ntt";
replace = ''
World A) Animals farmed for food.
World B) Humans farmed for food.
All else equal, what is true of world A that is untrue of world B, that if made true of world B, would make world B permissible?'';
}
{
trigger = ":dotfiles";
replace = "https://gitlab.com/upRootNutrition/dotfiles";
}
{
trigger = ":website";
replace = "https://uprootnutrition.com";
}
{
trigger = ":mail0";
replace = email.address0;
}
{
trigger = ":mail1";
replace = email.address2;
}
];
};
base = baseMatches;
global_vars = {
global_vars = [
{