Skip to content

Instantly share code, notes, and snippets.

@willeccles
Last active February 26, 2024 11:47
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willeccles/02228fc54c42942531a072318dcaf82b to your computer and use it in GitHub Desktop.
Save willeccles/02228fc54c42942531a072318dcaf82b to your computer and use it in GitHub Desktop.
AppleScript for using Kitty in Alfred. This was made for bash, but can easily be made to work with any shell.
(* 2019-06-07: Added nohup and output redirection to fix a bug with "Open Terminal here" feature.
Thanks to @fools-mate for bringing the issue to my attention. *)
on alfred_script(q)
do shell script "cd ~; nohup /Applications/kitty.app/Contents/MacOS/kitty /bin/bash -c \"source ~/.bashrc && " & q & ";/bin/bash\" > /dev/null 2>&1 &"
end alfred_script
@willeccles
Copy link
Author

@aahung I am pretty sure this is a kitty preference, and I haven't noticed this issue before. Not sure what to tell you.

@pyrho
Copy link

pyrho commented Mar 23, 2020

If you want to open a new tab within an existing Kitty instance I came up with this: https://gist.github.com/pyrho/d2f4fe152eb8113b1956edd6d7456862, it's a bit more troublesome to set up, but nothing too hard ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment