firefox: add application actions to .desktop file

This commit is contained in:
Ryan Hendrickson 2022-08-15 12:47:27 -04:00
parent 7f3ad42166
commit 3b1f5eab31

View file

@ -86,6 +86,8 @@ let
++ pkcs11Modules;
gtk_modules = [ libcanberra-gtk3 ];
launcherName = "${applicationName}${nameSuffix}";
#########################
# #
# EXTRA PREF CHANGES #
@ -167,7 +169,7 @@ let
desktopItem = makeDesktopItem {
name = applicationName;
exec = "${applicationName}${nameSuffix} %U";
exec = "${launcherName} %U";
inherit icon;
desktopName = "${desktopName}${nameSuffix}${lib.optionalString forceWayland " (Wayland)"}";
genericName = "Web Browser";
@ -182,6 +184,20 @@ let
"x-scheme-handler/ftp"
];
startupWMClass = wmClass;
actions = {
new-window = {
name = "New Window";
exec = "${launcherName} --new-window %U";
};
new-private-window = {
name = "New Private Window";
exec = "${launcherName} --private-window %U";
};
profile-manager-window = {
name = "Profile Manager";
exec = "${launcherName} --ProfileManger";
};
};
};
nativeBuildInputs = [ makeWrapper lndir jq ];
@ -261,7 +277,7 @@ let
--suffix-each GTK_PATH ':' "$gtk_modules" \
--prefix PATH ':' "${xdg-utils}/bin" \
--suffix PATH ':' "$out/bin" \
--set MOZ_APP_LAUNCHER "${applicationName}${nameSuffix}" \
--set MOZ_APP_LAUNCHER "${launcherName}" \
--set MOZ_SYSTEM_DIR "$out/lib/mozilla" \
--set MOZ_LEGACY_PROFILES 1 \
--set MOZ_ALLOW_DOWNGRADE 1 \