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
Consider this script, which creates a new tab and then two additional windows within the new tab:
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: