1
0
Fork 0

feat(#2): Add a Desktop Entry

This allows it to show in application start menus. It doesn't have
icons yet but will handle in a future commit.
This commit is contained in:
Marce Coll 2024-08-21 22:39:38 +02:00
parent d1192c280d
commit c0383eedf5
3 changed files with 60 additions and 4 deletions

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1723991338,
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8a3354191c0d7144db9756a74755672387b702ba",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -26,16 +26,20 @@
name = "zen-browser"; name = "zen-browser";
src = builtins.fetchTarball { src = builtins.fetchTarball {
url = downloadUrl; url = downloadUrl;
sha256 = "sha256:1z81dg3xgfpkyj501gflx8lw7d8124iqwm27zqfja2b47zf4ai2x"; sha256 = "sha256:1z81dg3xgfpkyj501gflx8lw7d8124iqwm27zqfja2b47zf4ai2x";
}; };
desktopSrc = ./.;
phases = [ "installPhase" "fixupPhase" ]; phases = [ "installPhase" "fixupPhase" ];
nativeBuildInputs = [ pkgs.makeWrapper ] ; nativeBuildInputs = [ pkgs.makeWrapper pkgs.copyDesktopItems ] ;
installPhase = '' installPhase = ''
mkdir -p $out/bin && cp -r $src/* $out/bin mkdir -p $out/bin && cp -r $src/* $out/bin
mkdir -p $out/share/applications
install -D $desktopSrc/zen.desktop $out/share/applications/dev.zen.Zen.desktop
''; '';
fixupPhase = '' fixupPhase = ''

25
zen.desktop Normal file
View file

@ -0,0 +1,25 @@
[Desktop Entry]
Name=Zen Browser
Exec=zen %u
Icon=zen
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-alpha
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 %u
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=zen --private-window %u
[Desktop Action profilemanager]
Name=Open the Profile Manager
Exec=zen --ProfileManager %u