Firefox Config: Search Shortcuts

Hi, everyone

I am trying to currently declare my Firefox config declaratively in Home Manager. I have managed to get most of it to work pretty one.
But one bit I am struggling with is how I can uncheck the Search Shortcuts which I was currently doing manually when starting firefox.

This is so that the search options do not show up in the address bar (see photos ) (this time search with).

I was able to turn this off by doing this:

search = {
  force = true;
  default = "Kagi";
  order = ["Kagi" "Youtube" "NixOS Options" "Nix Packages" "GitHub" "HackerNews"];

  engines = {
     "Kagi".metaData.hidden = true;

    "Kagi" = {
    };

However then when I hide a search option, I also was not able to do say @np to search nix packages.

My current config looks like this: modules/home/browsers/firefox/default.nix · 1706021fb42150224fc45e01bedc648ac11f1e04 · Haseeb Majid / dotfiles · GitLab

Any help would be greatly appreciated :pray:

Than you in advance!!! :nix:


Kagi is hidden because of this

Edit: Ok, do you want to hide the search engine and still have a working keyword ?

Yes sorry if that wasn’t clear!

Ok, so my understanding is that this “hidden” flag is here to globally deactivate one search engine. To act on the list of displayed engines without interfering with their activation, one can tick the first column, which is called engineShown, but I can’t find any occurence of “shown” or “visible” in https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm, so I don’t think this can be set from programs.firefox.profiles.<name>.search.engines.

Then, I guess this is a missing feature. Maybe you should open an issue on hm repo about this ?

1 Like

Done Firefox: Ability to toggle search options · Issue #5434 · nix-community/home-manager · GitHub

Please feel free to add more details if needed.