diff --git a/assets/desktop/zen.desktop b/assets/desktop/zen.desktop new file mode 100644 index 0000000..d3eed1d --- /dev/null +++ b/assets/desktop/zen.desktop @@ -0,0 +1,25 @@ +[Desktop Entry] +Name=Zen Browser +Exec=zen-beta %u +Icon=zen-beta +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json; +StartupWMClass=zen-beta +Categories=Network;WebBrowser; +StartupNotify=true +Terminal=false +X-MultipleArgs=false +Keywords=Internet;WWW;Browser;Web;Explorer; +Actions=new-window;new-private-window;profilemanager; + +[Desktop Action new-window] +Name=Open a New Window +Exec=zen-beta %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Exec=zen-beta --private-window %u + +[Desktop Action profilemanager] +Name=Open the Profile Manager +Exec=zen-beta --ProfileManager %u \ No newline at end of file diff --git a/assets/desktop/zen_twilight.desktop b/assets/desktop/zen_twilight.desktop new file mode 100644 index 0000000..b382954 --- /dev/null +++ b/assets/desktop/zen_twilight.desktop @@ -0,0 +1,25 @@ +[Desktop Entry] +Name=Zen Browser (Twilight) +Exec=zen-twilight %u +Icon=zen-twilight +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json; +StartupWMClass=zen-twilight +Categories=Network;WebBrowser; +StartupNotify=true +Terminal=false +X-MultipleArgs=false +Keywords=Internet;WWW;Browser;Web;Explorer; +Actions=new-window;new-private-window;profilemanager; + +[Desktop Action new-window] +Name=Open a New Window +Exec=zen-twilight %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Exec=zen-twilight --private-window %u + +[Desktop Action profilemanager] +Name=Open the Profile Manager +Exec=zen-twilight --ProfileManager %u \ No newline at end of file diff --git a/package.nix b/package.nix index 3702902..5a99fbd 100644 --- a/package.nix +++ b/package.nix @@ -52,7 +52,7 @@ in inherit (variant) version; src = builtins.fetchTarball {inherit (variant) url sha256;}; - desktopSrc = ./.; + desktopSrc = ./assets/desktop; nativeBuildInputs = [ wrapGAppsHook3 @@ -92,6 +92,8 @@ in # ! twilight and beta could collide if both are installed ln -s "$out/bin/${binaryName}" "$out/bin/zen" + install -D $desktopSrc/${desktopFile} $out/share/applications/${desktopFile} + mkdir -p "$out/lib/zen-${variant.version}/distribution" ln -s ${policiesJson} "$out/lib/zen-${variant.version}/distribution/policies.json"