From c9c8b65abf4de05b036af021ccf1dd469fd0475a Mon Sep 17 00:00:00 2001 From: turtlebasket Date: Wed, 24 Aug 2022 17:36:18 -0700 Subject: [PATCH] modify nvim launcher scripts --- ...auncher.applescript => NvimLauncherITerm.applescript} | 8 ++++++-- scripts/NvimLauncherKitty.applescript | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) rename scripts/{NvimLauncher.applescript => NvimLauncherITerm.applescript} (56%) create mode 100644 scripts/NvimLauncherKitty.applescript diff --git a/scripts/NvimLauncher.applescript b/scripts/NvimLauncherITerm.applescript similarity index 56% rename from scripts/NvimLauncher.applescript rename to scripts/NvimLauncherITerm.applescript index a977db3..dee33d6 100644 --- a/scripts/NvimLauncher.applescript +++ b/scripts/NvimLauncherITerm.applescript @@ -1,8 +1,13 @@ -# Modified from: https://gist.github.com/charlietran/43639b0f4e0a01c7c20df8f1929b76f2?permalink_comment_id=2737814#gistcomment-2737814 +# From: https://gregrs-uk.github.io/2018-11-01/open-files-neovim-iterm2-macos-finder/ # Instructions: # - Create new application in Automator # - Add "run applescript" step # - Paste in the below script +# From: https://gregrs-uk.github.io/2018-11-01/open-files-neovim-iterm2-macos-finder/ +# Instructions: +# - Create new application in Automator +# - Add "run applescript" step +# - Paste in the below script on run {input, parameters} set myPath to POSIX path of input @@ -14,4 +19,3 @@ on run {input, parameters} end tell end tell end run - diff --git a/scripts/NvimLauncherKitty.applescript b/scripts/NvimLauncherKitty.applescript new file mode 100644 index 0000000..484a13b --- /dev/null +++ b/scripts/NvimLauncherKitty.applescript @@ -0,0 +1,9 @@ +# Based on the iTerm script + +on run {input, parameters} + set myPath to POSIX path of input + set cmd to "/opt/homebrew/bin/nvim -p " & quote & myPath & quote + tell application "System Events" to tell process "kitty" + click menu item "New Tab" of menu "Shell" of menu bar 1 + end tell +end run