diff --git a/home/jonas/doom.nix b/home/jonas/doom.nix index 481e317..794b5e8 100644 --- a/home/jonas/doom.nix +++ b/home/jonas/doom.nix @@ -91,11 +91,22 @@ in { }; }; desktopEntries = { - doom = { + doom-server = { + name = "Doom Emacs (Server)"; + genericName = "Text Editor"; + icon = ./static/doom-config/icon.png; + exec = "${wrapped-emacs}/bin/emacs %F"; + terminal = false; + categories = ["Application" "Development"]; + mimeType = ["text/*"]; + }; + doom-client = { name = "Doom Emacs"; genericName = "Text Editor"; icon = ./static/doom-config/icon.png; - exec = "${wrapped-emacs}/bin/emacs %U"; + exec = '' + sh -c "if [ -n \\"\\$*\\" ]; then exec ${wrapped-emacs}/bin/emacs-client --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F + ''; terminal = false; categories = ["Application" "Development"]; mimeType = ["text/*"];