Match against kitty window id directly when using kitty @ launch

When launch matches using `id` kitty tries to match against tab id
before matching windows. When there are multiple tabs it's likely to
match a tab before matching a window.

Use `window_id` directly to avoid any possiblity of matching tabs.

This is only needed for `kitty @ launch` for other commands there is
no specific `window_id` field.
This commit is contained in:
Hampus Fröjdholm 2023-05-07 12:04:55 +02:00
parent 2adc81c4c9
commit 7c54de2334
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ The program passed as argument will be executed in the new terminal' \
nop %sh{
match=""
if [ -n "$kak_client_env_KITTY_WINDOW_ID" ]; then
match="--match=id:$kak_client_env_KITTY_WINDOW_ID"
match="--match=window_id:$kak_client_env_KITTY_WINDOW_ID"
fi
listen=""
@ -37,7 +37,7 @@ The program passed as argument will be executed in the new terminal' \
nop %sh{
match=""
if [ -n "$kak_client_env_KITTY_WINDOW_ID" ]; then
match="--match=id:$kak_client_env_KITTY_WINDOW_ID"
match="--match=window_id:$kak_client_env_KITTY_WINDOW_ID"
fi
listen=""

View File

@ -20,7 +20,7 @@ define-command -params .. \
match=""
if [ -n "$kak_client_env_KITTY_WINDOW_ID" ]; then
match="--match=id:$kak_client_env_KITTY_WINDOW_ID"
match="--match=window_id:$kak_client_env_KITTY_WINDOW_ID"
fi
listen=""