Update espanso matches

This commit is contained in:
Oliver Davies 2024-11-20 22:42:14 +00:00
parent 785b24ca0f
commit 7c5461892c
2 changed files with 16 additions and 9 deletions

View file

@ -1,3 +1,5 @@
{ lib, ... }:
{ {
services.espanso = { services.espanso = {
enable = true; enable = true;
@ -10,7 +12,7 @@
}; };
matches = { matches = {
base = import ./espanso/matches/base.nix; base = import ./espanso/matches/base.nix { inherit lib; };
}; };
}; };
} }

View file

@ -1,10 +1,19 @@
{ lib, ... }:
let let
inherit (lib) removePrefix;
websiteUrl = "https://www.oliverdavies.uk"; websiteUrl = "https://www.oliverdavies.uk";
dailyUrl = "https://dailydrupaler.com"; dailyUrl = "https://dailydrupaler.com";
githubUrl = "https://github.com/opdavies";
podcastUrl = "https://beyondblockspodcast.com"; podcastUrl = "https://beyondblockspodcast.com";
in in
{ {
matches = [ matches = [
{
trigger = ":email";
replace = "oliver@${removePrefix "https://www." websiteUrl}";
}
{ {
trigger = ":archive"; trigger = ":archive";
replace = "${websiteUrl}/archive"; replace = "${websiteUrl}/archive";
@ -26,16 +35,12 @@ in
replace = "${dailyUrl}"; replace = "${dailyUrl}";
} }
{ {
trigger = ":dotfiles"; trigger = ":dot";
replace = "https://github.com/opdavies/dotfiles.nix"; replace = "${githubUrl}/dotfiles";
} }
{ {
trigger = ":dc"; trigger = ":gh";
replace = "Drupal Commerce"; replace = "${githubUrl}";
}
{
trigger = ":dr";
replace = "Drupal";
} }
{ {
trigger = ":gt"; trigger = ":gt";