Add 'kit' script for easily sending commands to a running kitty
This commit is contained in:
parent
5716e4312d
commit
4a45aeb042
1 changed files with 13 additions and 0 deletions
13
local/bin/kit
Executable file
13
local/bin/kit
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
: ${XDG_CACHE_HOME:=~/.cache}
|
||||||
|
MAC_KITTY=/Applications/kitty.app/Contents/MacOS
|
||||||
|
|
||||||
|
if (( $+commands[kitty] == 0 )); then
|
||||||
|
if [[ -x $MAC_KITTY/kitty ]]; then
|
||||||
|
path=($MAC_KITTY $path)
|
||||||
|
else
|
||||||
|
print "Sorry, kitty must be installed to use this script! https://sw.kovidgoyal.net/kitty" >2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
exec kitty @ --to unix:$XDG_CACHE_HOME/kitty/kitty.sock "$@"
|
Loading…
Reference in a new issue