Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow @ launch to match against last created window #5753

Closed
salmankhilji opened this issue Dec 10, 2022 · 0 comments
Closed

Allow @ launch to match against last created window #5753

salmankhilji opened this issue Dec 10, 2022 · 0 comments

Comments

@salmankhilji
Copy link

Consider this script, which creates a new tab and then two additional windows within the new tab:

id=$(kitty @ launch --keep-focus --type=tab --location=after)
id=$(kitty @ launch --match=id:$id)
id=$(kitty @ launch --match=id:$id)
kitty @ resize-window --increment=-8 --axis=vertical --match=id:$id

While this works, it would be nice if I did not have to create a temp variable, id, to remember the last created window.

Describe the solution you'd like

Say we introduce a new sentinel value, last, that matches the the last created window, which might not necessarily be in the active tab, then the above script would look like:

kitty @ launch --keep-focus --type=tab --location=after
kitty @ launch --match=id:last
kitty @ launch --match=id:last
kitty @ resize-window --increment=-8 --axis=vertical --match=id:last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant