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