From 04e4b4779480622f4baa4aa3656cfad2ae0c8935 Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 12 Jan 2025 13:18:31 -0600 Subject: [PATCH] search: add google fonts engine Signed-off-by: Myned --- options/custom/programs/chromium.nix | 6 ++++++ options/custom/programs/firefox.nix | 7 +++++++ options/custom/programs/walker/search.sh | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/options/custom/programs/chromium.nix b/options/custom/programs/chromium.nix index 5d7f87f..e955724 100644 --- a/options/custom/programs/chromium.nix +++ b/options/custom/programs/chromium.nix @@ -120,6 +120,12 @@ in { url = "https://github.com/search?q={searchTerms}"; } + { + name = "Google Fonts"; + shortcut = "gf"; + url = "https://fonts.google.com/?query={searchTerms}"; + } + { name = "Home Manager Issues"; shortcut = "hi"; diff --git a/options/custom/programs/firefox.nix b/options/custom/programs/firefox.nix index 5abd773..ce9ac48 100644 --- a/options/custom/programs/firefox.nix +++ b/options/custom/programs/firefox.nix @@ -318,6 +318,13 @@ in { URLTemplate = "https://www.google.com/search?q={searchTerms}"; } + { + Name = "Google Fonts"; + Alias = "gf"; + IconURL = "https://www.gstatic.com/images/icons/material/apps/fonts/1x/catalog/v5/favicon.svg"; + URLTemplate = "https://fonts.google.com/?query={searchTerms}"; + } + { Name = "GitHub"; Alias = "gh"; diff --git a/options/custom/programs/walker/search.sh b/options/custom/programs/walker/search.sh index cd2bd80..ab1361a 100644 --- a/options/custom/programs/walker/search.sh +++ b/options/custom/programs/walker/search.sh @@ -56,6 +56,12 @@ case "$1" in url="https://www.google.com/search?q=" query="${1:2}" ;; + 'gf '*) + label="Google Fonts" + icon="google" + url="https://fonts.google.com/?query=" + query="${1:3}" + ;; 'gh '*) label="GitHub" icon="github"