use the .desktop file generated via wrapFirefox

This commit is contained in:
Dmitry Chermnykh
2025-04-02 21:33:26 +05:00
parent 8f64cd437e
commit 808562590c
4 changed files with 14 additions and 55 deletions

View File

@@ -33,7 +33,7 @@
in
pkgs.wrapFirefox entry {
icon = "zen-${name}";
wmClass = "zen";
wmClass = "zen-${name}";
hasMozSystemDirPatch = false;
};

View File

@@ -19,7 +19,18 @@
adwaita-icon-theme,
writeText,
patchelfUnstable, # have to use patchelfUnstable to support --no-clobber-old-sections
applicationName ? "Zen Browser",
applicationName ?
"Zen Browser"
+ (
if name == "beta" then
" (Beta)"
else if name == "twilight" then
" (Twilight)"
else if name == "twilight-official" then
" (Twilight)"
else
""
),
}:
let
@@ -86,8 +97,6 @@ stdenv.mkDerivation {
mkdir -p "$out/lib/zen-${variant.version}/distribution"
ln -s ${policiesJson} "$out/lib/zen-${variant.version}/distribution/policies.json"
install -D $desktopSrc/zen-${name}.desktop $out/share/applications/${desktopFile}
install -D $src/browser/chrome/icons/default/default16.png $out/share/icons/hicolor/16x16/apps/zen-${name}.png
install -D $src/browser/chrome/icons/default/default32.png $out/share/icons/hicolor/32x32/apps/zen-${name}.png
install -D $src/browser/chrome/icons/default/default48.png $out/share/icons/hicolor/48x48/apps/zen-${name}.png
@@ -111,7 +120,7 @@ stdenv.mkDerivation {
changelog = "https://github.com/zen-browser/desktop/releases";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = builtins.attrNames mozillaPlatforms;
hydraPlatforms = [];
hydraPlatforms = [ ];
mainProgram = binaryName;
};
}

View File

@@ -1,25 +0,0 @@
[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

View File

@@ -1,25 +0,0 @@
[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