From 5c1cc4d75ff45a5c6a4fbccf6123db968f3a311e Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Fri, 13 Oct 2023 10:44:05 +0200 Subject: [PATCH] always open new firefox window when opened from launcher closes #7 --- home/firefox/default.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/home/firefox/default.nix b/home/firefox/default.nix index a2563df..65775fa 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}@args: +{pkgs, lib, ...}@args: let nurpkgs = import (builtins.fetchTarball {url = "https://github.com/nix-community/NUR/archive/master.tar.gz"; sha256 = "1gb3wkmyl6xbs4kval2ml48nlil39853dj62rxfrlk9i2nky2ly4"; }) { inherit pkgs; }; @@ -49,5 +49,24 @@ in terminal = false; type = "Application"; }; + + xdg.desktopEntries.firefox = lib.mkForce { + categories = [ "Network" "WebBrowser" ]; + exec = "firefox --new-window --name firefox %U"; + genericName = "Web Browser"; + icon = "firefox"; + mimeType = [ + "text/html" + "text/xml" + "application/xhtml+xml" + "application/vnd.mozilla.xul+xml" + "x-scheme-handler/http" + "x-scheme-handler/https" + ]; + name = "Firefox"; + startupNotify = true; + terminal = false; + type = "Application"; + }; }; }