Merge remote-tracking branch 'kayhide/kitty-listen-on'
This commit is contained in:
commit
5eb2be3e6b
|
@ -15,7 +15,11 @@ kitty-terminal <program> [<arguments>]: create a new terminal as a kitty window
|
|||
The program passed as argument will be executed in the new terminal' \
|
||||
%{
|
||||
nop %sh{
|
||||
kitty @ new-window --no-response --window-type $kak_opt_kitty_window_type --cwd "$PWD" "$@"
|
||||
if [ -z "$kak_client_env_KITTY_LISTEN_ON" ]; then
|
||||
kitty @ new-window --no-response --window-type "$kak_opt_kitty_window_type" --cwd "$PWD" "$@"
|
||||
else
|
||||
kitty @ --to "$kak_client_env_KITTY_LISTEN_ON" new-window --no-response --window-type "$kak_opt_kitty_window_type" --cwd "$PWD" "$@"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +28,11 @@ kitty-terminal-tab <program> [<arguments>]: create a new terminal as kitty tab
|
|||
The program passed as argument will be executed in the new terminal' \
|
||||
%{
|
||||
nop %sh{
|
||||
if [ -z "$kak_client_env_KITTY_LISTEN_ON" ]; then
|
||||
kitty @ new-window --no-response --new-tab --cwd "$PWD" "$@"
|
||||
else
|
||||
kitty @ --to "$kak_client_env_KITTY_LISTEN_ON" new-window --no-response --new-tab --cwd "$PWD" "$@"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,8 +44,13 @@ If no client is passed then the current one is used' \
|
|||
if [ $# -eq 1 ]; then
|
||||
printf "evaluate-commands -client '%s' focus" "$1"
|
||||
else
|
||||
if [ -z "$kak_client_env_KITTY_LISTEN_ON" ]; then
|
||||
kitty @ focus-tab --no-response -m=id:$kak_client_env_KITTY_WINDOW_ID
|
||||
kitty @ focus-window --no-response -m=id:$kak_client_env_KITTY_WINDOW_ID
|
||||
else
|
||||
kitty @ --to "$kak_client_env_KITTY_LISTEN_ON" focus-tab --no-response -m=id:$kak_client_env_KITTY_WINDOW_ID
|
||||
kitty @ --to "$kak_client_env_KITTY_LISTEN_ON" focus-window --no-response -m=id:$kak_client_env_KITTY_WINDOW_ID
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user