When arranging panes using settings.json startupActions, add support for additional pane arrangements #13693

Closed
opened 2026-01-31 03:49:37 +00:00 by claunia · 3 comments
Owner

Originally created by @dipique on GitHub (Apr 30, 2021).

Description of the new feature/enhancement

I would like to initialize my terminal with two panes on top, and one pane on the bottom, but this is impossible with the current implementation of startupActions in settings.json.

If I split horizontally, then vertically (sp -H `; sp), I get one pane on the left, two on the right. If I split vertically, then horizontally (sp `; sp -H), I get one pane on top, two on the bottom.

More generally: with three panes (one pane + two splits), there are 4 arrangement permutations (2 splits * 2 orientations); but there are 6 rectangular arrangements of 3 panes; thus, there are 2 inaccessible arrangements(2 top 1 bottom, and 2 left 1 right).

  • 3 horizontal (sp -H `; sp -H)
  • 3 vertical (sp `; sp)
  • 1 left 2 right (sp -H `; sp)
  • 1 top 2 bottom (sp `; sp -H)
  • 2 top 1 bottom (unsupported)
  • 2 left 1 right (unsupported)

This request is to add support for those two inaccessible (via settings.json) arrangements.

Note that these arrangements CAN be created manually once Windows Terminal has opened. This is because when open, the option to split panes splits the focused pane, whereas during startup, splitting panes splits the last (highest index?) pane. Thus, I can split vertically, select the top pane, and then split it horizontally to get 2 top 1 bottom.

Proposed technical implementation details (optional)

When I tried to accomplish 2 top 1 bottom for myself, I did so by setting the focused tab, like this:

"startupActions": "sp -H `; ft -t 0 `; sp"

This didn't work, of course, but my suggestion would be to support this method, meaning to respect focus when splitting panes during startup. Advantages as I see them:

  • It doesn't break existing configurations
  • It mimics how a user would accomplish this in the UI, so it's trivial for a user to create even very complex arrangements by noting the steps to do it manually
  • It leverages existing paradigms (e.g. pane focus) and thus doesn't require new parameters, options, or user education
  • It effectively addresses the issue even when many more panes are added without allowing the increased permutative complexity to effect the complexity of parsing OR writing the configuration arguments.
Originally created by @dipique on GitHub (Apr 30, 2021). # Description of the new feature/enhancement I would like to initialize my terminal with two panes on top, and one pane on the bottom, but this is impossible with the current implementation of `startupActions` in `settings.json`. If I split horizontally, then vertically (``sp -H `; sp``), I get one pane on the left, two on the right. If I split vertically, then horizontally (``sp `; sp -H``), I get one pane on top, two on the bottom. More generally: with three panes (one pane + two splits), there are 4 arrangement permutations (2 splits * 2 orientations); but there are 6 rectangular arrangements of 3 panes; thus, there are 2 inaccessible arrangements(2 top 1 bottom, and 2 left 1 right). - 3 horizontal (``sp -H `; sp -H``) - 3 vertical (``sp `; sp``) - 1 left 2 right (``sp -H `; sp``) - 1 top 2 bottom (``sp `; sp -H``) - 2 top 1 bottom (**unsupported**) - 2 left 1 right (**unsupported**) This request is to add support for those two inaccessible (via `settings.json`) arrangements. Note that these arrangements CAN be created manually once Windows Terminal has opened. This is because when open, the option to split panes splits the focused pane, whereas during startup, splitting panes splits the last (highest index?) pane. Thus, I can split vertically, select the top pane, and then split it horizontally to get 2 top 1 bottom. # Proposed technical implementation details (optional) When I tried to accomplish 2 top 1 bottom for myself, I did so by setting the focused tab, like this: `` "startupActions": "sp -H `; ft -t 0 `; sp"`` This didn't work, of course, but my suggestion would be to support this method, meaning to respect focus when splitting panes during startup. Advantages as I see them: - It doesn't break existing configurations - It mimics how a user would accomplish this in the UI, so it's trivial for a user to create even very complex arrangements by noting the steps to do it manually - It leverages existing paradigms (e.g. pane focus) and thus doesn't require new parameters, options, or user education - It effectively addresses the issue even when many more panes are added without allowing the increased permutative complexity to effect the complexity of parsing OR writing the configuration arguments.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 03:49:38 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 3, 2021):

You actually can acocmplish this today, with the move-focus subcommand. So for your original example:

two panes on top, and one pane on the bottom,

That would be something like

wt sp -H ; move-focus up ; sp -V

Then there's also /dup #5464 Add support for focus-pane

@zadjii-msft commented on GitHub (May 3, 2021): You actually can acocmplish this today, with the `move-focus` subcommand. So for your original example: > two panes on top, and one pane on the bottom, That would be something like ``` wt sp -H ; move-focus up ; sp -V ``` Then there's also /dup #5464 Add support for `focus-pane`
Author
Owner

@ghost commented on GitHub (May 3, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (May 3, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@dipique commented on GitHub (May 3, 2021):

Thank you!

@dipique commented on GitHub (May 3, 2021): Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13693