From ced61096df420d54ee621143c654f26b702a1cab Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Feb 2022 12:57:15 +0530 Subject: [PATCH] Add some docs for the previous PR --- docs/changelog.rst | 3 +++ docs/open_actions.rst | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index e926475ca..17d75b4ae 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -78,6 +78,9 @@ Detailed list of changes 0.24.3 [future] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- macOS: Allow kitty to handle various URL types. Can be configured via + :ref:`launch_actions` + - Fix a regression in the previous release that broke :opt:`active_tab_foreground` (:iss:`4620`) - ssh kitten: Fix location of generated terminfo files on NetBSD (:iss:`4622`) diff --git a/docs/open_actions.rst b/docs/open_actions.rst index 961178a16..8f8b12953 100644 --- a/docs/open_actions.rst +++ b/docs/open_actions.rst @@ -102,14 +102,20 @@ lines. The various available criteria are: ``image-??.png`` +.. _launch_actions: + Scripting the opening of files with kitty on macOS ------------------------------------------------------- -On macOS you can use :guilabel:`Open With` in Finder or drag and drop files -onto the kitty dock icon to open them with kitty. The default action -is to open text files in your editor and images using the icat kitten. -Shell scripts are run in a shell. You can customize these actions by creating -a :file:`launch-actions.conf` file in the kitty config directory, just like +On macOS you can use :guilabel:`Open With` in Finder or drag and drop files and +URLs onto the kitty dock icon to open them with kitty. The default actions are: + +* Open text files in your editor and images using the icat kitten. +* Run shell scripts in a shell +* Open SSH urls using the ssh command + +You can customize these actions by creating a :file:`launch-actions.conf` file +in the kitty config directory, just like the :file:`open-actions.conf` file above. For example: .. code:: conf @@ -138,3 +144,7 @@ the :file:`open-actions.conf` file above. For example: protocol file mime image/* action launch --type=os-window kitty +kitten icat --hold $FILE_PATH + + # Open ssh URLs with ssh command + protocol ssh + action launch --type=os-window ssh $URL