-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
If macos-launch-services-cmdline file is present, open's --args is entirely ignored and macos-launch-services-cmdline is anyways applied.
Given macos-launch-services-cmdline's purpose, which is to provide command line arguments to kitty when launching from the GUI, I expected to be able to override this when launching through open -na /Applications/kitty.app --args <...>.
This might be entirely intended, for whichever reasons, but still I felt it's worthwhile to start a discussion, as to me personally it's unexpected.
To Reproduce
Steps to reproduce the behavior:
- Create a
<kitty-config>/macos-launch-services-cmdlinefile with the content-1. - Open
kittyfrom the terminal usingopen -na /Applications/kitty.app --args -1 --instance-group x - Observe that a new OS window is launched in the existing single instance, instead of a new single instance (group
x) being launched. (Single dock icon, instead of two)
Additional context
I wanted to have two different single kitty instances running, a general purpose one usually launched through the GUI which has remote control disabled, and a quake/tilde/visor one with remote control enabled.
To achieve this, I added -1 --instance group main to macos-launch-services-cmdline and launched the quake instance through open -na /Applications/kitty.app --args -1 --instance-group qitty --listen-on unix:/tmp/qitty.
While I'm sure there are better ways to achieve this, I had issues particular to my workflow that led me down this path.
Currently I settled on backing-up and later restoring macos-launch-services-cmdline while launching the quake instance, which is rather ugly.