diff --git a/packages/devkit/ghostty.nix b/packages/devkit/ghostty.nix index 690639a..e0f1eb8 100644 --- a/packages/devkit/ghostty.nix +++ b/packages/devkit/ghostty.nix @@ -2,7 +2,6 @@ symlinkJoin, makeWrapper, pkgs, - lib, ghostty ? pkgs.ghostty, command ? null, }: let @@ -36,9 +35,7 @@ in symlinkJoin ({ paths = [ghostty]; - - nativeBuildInputs = [makeWrapper]; - + nativeBuildInputs = [makeWrapper pkgs.coreutils]; postBuild = '' wrapProgram $out/bin/ghostty \ --add-flags '--theme=${theme}' ${ @@ -46,6 +43,9 @@ in then "--add-flags '-e' --add-flags '${command}'" else "" } + sed -i \ + "s|Exec=.*|Exec=$out/bin/ghostty --gtk-single-instance=true|" \ + $out/share/applications/com.mitchellh.ghostty.desktop ''; } // {inherit (ghostty) name pname meta shell_integration terminfo;})