From 0917191118c55bdb750f3c05205929001c48d203 Mon Sep 17 00:00:00 2001 From: Hideaki Kawai Date: Thu, 21 Jan 2021 18:58:48 +0900 Subject: [PATCH] Respect KITTY_LISTEN_ON when launching terminal --- rc/windowing/kitty.kak | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rc/windowing/kitty.kak b/rc/windowing/kitty.kak index 219766a1..3d4298fa 100644 --- a/rc/windowing/kitty.kak +++ b/rc/windowing/kitty.kak @@ -15,7 +15,11 @@ kitty-terminal []: 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 } }