dotfiles/modules/home/gui/apps/tools/espanso/default.nix
2025-05-31 20:44:18 -05:00

60 lines
1.4 KiB
Nix
Executable file

{
flake,
pkgs,
...
}:
let
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 = {
enable = true;
configs = {
default = {
pre_paste_delay = 0;
show_notifications = false;
};
};
package = pkgs.espanso-wayland;
matches = {
base = baseMatches;
global_vars = {
global_vars = [
{
name = "currentdate";
type = "date";
params = {
format = "%d/%m/%Y";
};
}
{
name = "currenttime";
type = "date";
params = {
format = "%R";
};
}
];
};
};
};
}