mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
Cleanup previous PR
This commit is contained in:
@@ -120,15 +120,17 @@ These actions can also be executed from the command line by running::
|
||||
or
|
||||
kitty +open file_or_url ...
|
||||
|
||||
Since macOS lacks an official interface to set default URL scheme handler, you
|
||||
can set it with the following command. The first argument for
|
||||
``cocoa_set_url_handler`` is the URL scheme, and the second optional argument is
|
||||
the bundle id of the app, which defaults to kitty's. (Restores when the second
|
||||
argument is an empty string.)
|
||||
Since macOS lacks an official interface to set default URL scheme handlers,
|
||||
kitty has a command you can use for it. The first argument for is the URL
|
||||
scheme, and the second optional argument is the bundle id of the app, which
|
||||
defaults to kitty, if not specified. For example:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
kitty +runpy 'from kitty.fast_data_types import cocoa_set_url_handler; print(cocoa_set_url_handler("ssh", "net.kovidgoyal.kitty"));'
|
||||
# Set kitty as the handler for ssh:// URLs
|
||||
kitty +runpy 'from kitty.fast_data_types import cocoa_set_url_handler; import sys; cocoa_set_url_handler(*sys.argv[1:]); print("OK")' ssh
|
||||
# Set someapp as the handler for xyz:// URLs
|
||||
kitty +runpy 'from kitty.fast_data_types import cocoa_set_url_handler; import sys; cocoa_set_url_handler(*sys.argv[1:]); print("OK")' xyz someapp.bundle.identifier
|
||||
|
||||
You can customize these actions by creating a :file:`launch-actions.conf` file
|
||||
in the kitty config directory, just like
|
||||
|
||||
Reference in New Issue
Block a user