diff --git a/home/browsers/firefox.nix b/home/browsers/firefox.nix index 0c56719..bdf6afe 100644 --- a/home/browsers/firefox.nix +++ b/home/browsers/firefox.nix @@ -47,6 +47,7 @@ let "services.sync.engine.passwords" = false; "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + "browser.newtabpage.activity-stream.feeds.snippets" = false; }; in { @@ -71,6 +72,8 @@ in https-everywhere ublock-origin decentraleyes + clearurls + terms-of-service-didnt-read vimium ipfs-companion firefox-addons."1password-x-password-manager" @@ -78,6 +81,7 @@ in # not available yet: # languagetool # fx_cast + # google-lighthouse ]; }; @@ -85,18 +89,29 @@ in escapeDesktopArg = arg: replaceStrings ["\""] ["\"\\\"\""] (toString arg); makeFirefoxProfileDesktopItem = attrs: let - mkExec = with lib; { profile, ... }: '' - firefox -p "${ escapeDesktopArg profile }" + mkExec = with lib; { name, profile, ... }: '' + firefox -p "${ escapeDesktopArg profile }" --class="firefox-${ escapeDesktopArg name }" ''; in - pkgs.makeDesktopItem ((removeAttrs attrs [ "profile" ]) // { exec = mkExec attrs; }); + pkgs.makeDesktopItem ((removeAttrs attrs [ "profile" ]) // { + exec = mkExec attrs; + extraEntries = '' + StartupWMClass="${ escapeDesktopArg attrs.name }" + ''; + }); makeFirefoxWebAppDesktopItem = attrs: let - mkExec = with lib; { app, profile ? "private", ... }: '' - firefox -p "${ escapeDesktopArg profile }" --ssb="${ escapeDesktopArg app }" + # --class not yet respected: https://bugzilla.mozilla.org/show_bug.cgi?id=1606247 + mkExec = with lib; { app, name, profile ? "private", ... }: '' + firefox -p "${ escapeDesktopArg profile }" --ssb="${ escapeDesktopArg app }" --class="${ escapeDesktopArg name }" ''; in - pkgs.makeDesktopItem ((removeAttrs attrs [ "app" "profile" ]) // { exec = mkExec attrs; }); + pkgs.makeDesktopItem ((removeAttrs attrs [ "app" "profile" ]) // { + exec = mkExec attrs; + extraEntries = '' + StartupWMClass="${ escapeDesktopArg attrs.name }" + ''; + }); in (with pkgs; [ (tor-browser-bundle-bin.override { pulseaudioSupport = true; }) @@ -105,9 +120,14 @@ in (makeFirefoxProfileDesktopItem { name = "firefox-work"; desktopName = "Firefox (Work)"; - icon = "firefox.png"; + icon = "firefox"; # TODO looks different profile = "work"; }) + (makeFirefoxWebAppDesktopItem { + name = "element"; + desktopName = "Element"; + app = "https://app.element.io"; + }) (makeFirefoxWebAppDesktopItem { name = "youtube-music"; desktopName = "YouTube Music";