From 585f75ae92787ffc5cdea4922e70c29972a3a672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 30 May 2025 14:47:35 +0200 Subject: [PATCH] firefox: youtube search engine --- nix/configurations/vanadium/home/firefox.nix | 29 ++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index a69dafd8..31b673bb 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -25,21 +25,28 @@ in { SearchEngines = { Default = "Google Customized"; Remove = ["Google"]; - Add = [ - (let - withFlags = x: - x - + mkLrFlag ["lang_fr" "lang_en" "lang_zh-TW"] - + mkGlFlag "fr" - + mkHlFlag "fr"; - in { + Add = let + withGoogleFlags = x: + x + + mkLrFlag ["lang_fr" "lang_en" "lang_zh-TW"] + + mkGlFlag "fr" + + mkHlFlag "fr"; + in [ + { Name = "Google Customized"; Alias = "G"; IconURL = "https://google.com/favicon.ico"; Description = "Your data yum yum"; - SuggestURLTemplate = withFlags "https://suggestqueries.google.com/complete/search?q={searchTerms}"; - URLTemplate = withFlags "https://google.com/search?q={searchTerms}"; - }) + SuggestURLTemplate = withGoogleFlags "https://suggestqueries.google.com/complete/search?q={searchTerms}"; + URLTemplate = withGoogleFlags "https://google.com/search?q={searchTerms}"; + } + { + Name = "YouTube"; + Alias = "yt"; + IconURL = "https://youtube.com/favicon.ico"; + SuggestURLTemplate = withGoogleFlags "http://suggestqueries.google.com/complete/search?q={searchTerms}&ds=yt"; + URLTemplate = withGoogleFlags "https://www.youtube.com/results?search_query={searchTerms}"; + } { Name = "Codeberg"; Alias = "gco";