vanadium/firefox: inline some bindings

This commit is contained in:
Primrose 2025-08-04 21:45:35 +02:00
parent 8fade47f8c
commit 76059ce726
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -13,10 +13,7 @@ in {
SearchEngines = { SearchEngines = {
Default = "Google en@en"; Default = "Google en@en";
Remove = ["Google"]; Remove = ["Google"];
Add = let Add =
lrValues = ["lang_fr" "lang_en" "lang_zh-TW"];
hlValues = ["fr" "en" "zh-TW"];
in
# Google specialized for each language x display language # Google specialized for each language x display language
# reference: https://developers.google.com/custom-search/docs/xml_results?hl=zh-tw#advanced-search-query-parameters # reference: https://developers.google.com/custom-search/docs/xml_results?hl=zh-tw#advanced-search-query-parameters
lib.mapCartesianProduct ( lib.mapCartesianProduct (
@ -29,7 +26,7 @@ in {
in { in {
Name = "Google ${lr'}@${hl'}"; Name = "Google ${lr'}@${hl'}";
Alias = Alias =
if (lib.removePrefix "lang_" lr == hl) if lib.removePrefix "lang_" lr == hl
then "@G" + lr' then "@G" + lr'
else "@G" + lr' + hl'; else "@G" + lr' + hl';
Description = "Your data yum yum (but ${lr'} in ${hl'})"; Description = "Your data yum yum (but ${lr'} in ${hl'})";
@ -37,10 +34,9 @@ in {
SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}&lr=${lr}&hl=${hl}"; SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}&lr=${lr}&hl=${hl}";
URLTemplate = "https://google.com/search?q=-ai+{searchTerms}&lr=${lr}&hl=${hl}"; URLTemplate = "https://google.com/search?q=-ai+{searchTerms}&lr=${lr}&hl=${hl}";
} }
) ) {
{ lr = ["lang_fr" "lang_en" "lang_zh-TW"];
lr = lrValues; hl = ["fr" "en" "zh-TW"];
hl = hlValues;
} }
++ [ ++ [
# Forges # Forges