Repository navigation
Macos opening ghostty with open -n command opens it in a new process #3563
SummaryI am using Karabiner to set some global shortcuts to launch new instances (windows) of applications I have a shortcut that executes this command open -n "/Applications/Ghostty.app"What I expect: What happens: Why raise it as a question, not a bug?docs for
But this behavior is different than other applications, I have been using this cmd with other applications like browsers and other terminals, and what happens is that it always open a new window not create a new process |
Replies: 8 comments 15 replies
|
A workaround until/if this is fixed: You can run this AppleScript: This will open Ghostty if its closed, and will create a new window if it's open |
I'm not 100% sure about macOS, but in my experience, Firefox doesn't support opening multiple instances, which may be relevant (of course, I don't know what browser you use; I'm just mentioning this in case you use Firefox). |
This is the expected behavior of I'm not sure which terminal you're talking about but Terminal.app, iTerm 2, Kitty, and Alacritty all open multiple application instances on my box. When using this sort of logic in the future you probably want to switch to the standard rather than what you're doing as well. Not only will this find Applications not installed in |
|
Also you may want to follow #2353 since I think a direct way to manage Ghostty GUI components is what you're looking for rather than for |
|
For Terminal.app I have this handy function in my fish config: That allows me to write |
|
Following this discussion because I am suffering the same issue with iterm2 and skhd I used to have this config: ❯ cat .config/skhd/skhdrc
cmd - return : osascript -e 'tell application "iTerm2" to create window with default profile command ""' || open -na iTerm
cmd + shift - return : open -n -a "Google Chrome"And that osascript allows to open new windows in the same instance, instead of creating multiple iterm2 instances. |
|
A new instance is the intended behavior of |
|
|
A new instance is the intended behavior of
-nas noted here: #3563 (comment) Other applications are behaving odd, not us. :) There's probably some other way to script this but otherwise will be #2353.