From e53b2e1c905344ecdfa2888eb50a77cef6da9650 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 4 Apr 2024 02:57:03 +0200 Subject: [PATCH] fix some opensearch stuff --- modules/desktop/firefox.nix | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/modules/desktop/firefox.nix b/modules/desktop/firefox.nix index 826dc00..4e68444 100644 --- a/modules/desktop/firefox.nix +++ b/modules/desktop/firefox.nix @@ -97,7 +97,13 @@ "NixOS Wiki" = { urls = [ { - template = "https://nixos.wiki/index.php?title=Special:Search&search={searchTerms}&namespace=0"; + template = "https://nixos.wiki/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; } ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; @@ -106,15 +112,16 @@ "Noogle" = { urls = [ { - template = "https://noogle.dev/q?term={searchTerms}"; + template = "https://noogle.dev/q"; params = [ { - name = "q"; + name = "term"; value = "{searchTerms}"; } ]; } ]; + definedAliases = ["ngl"]; }; "lib.rs" = { urls = [ @@ -146,6 +153,14 @@ icon = "https://docs.rs/-/static/favicon.ico"; definedAliases = ["docs"]; }; + "rust docs direct open" = { + urls = [ + { + template = "https://docs.rs/{searchTerms}"; + } + ]; + definedAliases = ["docd"]; + }; "rust std docs" = { urls = [ { @@ -161,6 +176,19 @@ icon = "https://doc.rust-lang.org/favicon.ico"; definedAliases = ["std"]; }; + "MDN" = { + urls = [ + { + template = "https://developer.mozilla.org/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; "Bing".metaData.hidden = true; "Google".metaData.hidden = true; "Amazon.de".metaData.hidden = true;