From f8221851da10db191d51bbed1225e483fb9db83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 24 Dec 2023 17:29:01 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(kitty):=20add=20new=20open=20a?= =?UTF-8?q?ctions=20and=20rework=20the=20existing=20ones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/kitty/open-actions.conf | 35 ++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/.config/kitty/open-actions.conf b/.config/kitty/open-actions.conf index aa1bbcfc..4fddffeb 100644 --- a/.config/kitty/open-actions.conf +++ b/.config/kitty/open-actions.conf @@ -1,20 +1,31 @@ -# Open directories +# Directories protocol file mime inode/directory -nemo $FILE_PATH +xdg-open --type=os-window --cwd $FILE_PATH -# Open any file with a fragment in vim, fragments are generated -# by the hyperlink_grep kitten and nothing else so far. -protocol file -fragment_matches [0-9]+ -action launch --type=overlay nvim +${FRAGMENT} ${FILE_PATH} - -# Open text files without fragments in the editor +# Files protocol file mime text/* -action launch --type=overlay ${EDITOR} ${FILE_PATH} +action launch --type=overlay $EDITOR $FILE_PATH -# Open any image in the full kitty window by clicking on it +# Images protocol file mime image/* -action launch --type=overlay kitty +kitten icat --hold ${FILE_PATH} +xdg-open $FILE_PATH + +# SSH Urls +protocol ssh +action launch --type=os-window ssh $URL + +# Executables +action launch --hold --type=os-window $FILE_PATH + +# Shell files +protocol file +ext fish,bash,zsh +action launch --hold --type=os-window kitty +shebang $FILE_PATH __ext__ + +# Scripts +protocol file +ext sh,command,tool +action launch --hold --type=os-window kitty +shebang $FILE_PATH $SHELL