Ability to select and interact with subtrees of panes #14618

Closed
opened 2026-01-31 04:15:07 +00:00 by claunia · 4 comments
Owner

Originally created by @Rosefield on GitHub (Jul 20, 2021).

Description of the new feature/enhancement

There are a number of features that exist or are being made that allows one to manipulate the tree of panes from the leaves, e.g. resize-pane, split-pane, move-pane, toggle-split, etc. It would be helpful if this functionality could be extended such that a user can select a particular subtree and interact with it directly.

Some examples
Suppose you have the following grids

1
---------------------
|    1    |    3    |
----------+----------
|    2    |    4    |
---------------------  

2
-----------
|    1    |
|---------|
|    2    | 
|---------|
|    3    |
|---------|
|    4    |
-----------

where the tree for each is

  /\
/\  /\
1 2 3 4

currently there is no way to:

  • For the 2nd grid to resize the split between panes 2/3 (because resize will only work on the 1/2 or 3/4 parent)
  • For either, add a split on a parent, e.g. create the tree where an existing subtree is made into the child of a new parent
  / \
/\   /\
5 /\ 3 4
 1 2
  • Once the base features are added for move-panes, swap-panes, etc, it would be nice to be able to take an entire subtree and swap it with another pane/subtree, move it to another tab, etc in one action
  • For toggle-split once it is added because there is no way to select a parent of a pane, there is no way to turn grid 1 into grid 2 because only parents of leaves can be modified.

Proposed technical implementation details (optional)

One possible solution to this would be to have a hotkey (or other mechanism) to select the parent of the currently focused pane. This parent would then itself be focused and some of the existing set of actions could be applied to it. This might require giving IDs to non-leaf panes so that they can be addressed individually.

A component of this could also be some mechanism to show the tree structure of the tab, perhaps just adding borders (in different colors?) to every pane and not just leaf panes.

Originally created by @Rosefield on GitHub (Jul 20, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement There are a number of features that exist or are being made that allows one to manipulate the tree of panes from the leaves, e.g. resize-pane, split-pane, move-pane, toggle-split, etc. It would be helpful if this functionality could be extended such that a user can select a particular subtree and interact with it directly. Some examples Suppose you have the following grids ``` 1 --------------------- | 1 | 3 | ----------+---------- | 2 | 4 | --------------------- 2 ----------- | 1 | |---------| | 2 | |---------| | 3 | |---------| | 4 | ----------- ``` where the tree for each is ``` /\ /\ /\ 1 2 3 4 ``` currently there is no way to: - For the 2nd grid to resize the split between panes 2/3 (because resize will only work on the 1/2 or 3/4 parent) - For either, add a split on a parent, e.g. create the tree where an existing subtree is made into the child of a new parent ``` / \ /\ /\ 5 /\ 3 4 1 2 ``` - Once the base features are added for `move-panes`, `swap-panes`, etc, it would be nice to be able to take an entire subtree and swap it with another pane/subtree, move it to another tab, etc in one action - For `toggle-split` once it is added because there is no way to select a parent of a pane, there is no way to turn grid 1 into grid 2 because only parents of leaves can be modified. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) One possible solution to this would be to have a hotkey (or other mechanism) to select the parent of the currently focused pane. This parent would then itself be focused and some of the existing set of actions could be applied to it. This might require giving IDs to non-leaf panes so that they can be addressed individually. A component of this could also be some mechanism to show the tree structure of the tab, perhaps just adding borders (in different colors?) to every pane and not just leaf panes. <!-- A clear and concise description of what you want to happen. -->
Author
Owner

@zadjii-msft commented on GitHub (Jul 20, 2021):

Out of curiosity, is there any sort of similar functionality in tmux? They've got one of the best pane implementations out there. It's a pretty reliable source of good prior art.

@zadjii-msft commented on GitHub (Jul 20, 2021): Out of curiosity, is there any sort of similar functionality in `tmux`? They've got one of the best pane implementations out there. It's a pretty reliable source of good prior art.
Author
Owner

@DHowett commented on GitHub (Jul 20, 2021):

There is support for this in the i3 window manager, which is excellent. You can select panes or groups of panes at any level.

@DHowett commented on GitHub (Jul 20, 2021): There is support for this in the i3 window manager, which is excellent. You can select panes or groups of panes at any level.
Author
Owner

@Rosefield commented on GitHub (Jul 20, 2021):

Most of what I'm familiar with in terms of window managers is xmonad, and a lot of my thoughts on what features I want come from there. This particular request just seemed like the logical progression of functionality given what I've tried to do using this terminal since it has an explicit tree structure.

@Rosefield commented on GitHub (Jul 20, 2021): Most of what I'm familiar with in terms of window managers is xmonad, and a lot of my thoughts on what features I want come from there. This particular request just seemed like the logical progression of functionality given what I've tried to do using this terminal since it has an explicit tree structure.
Author
Owner

@ghost commented on GitHub (Oct 20, 2021):

:tada:This issue was addressed in #11153, which has now been successfully released as Windows Terminal Preview v1.12.2922.0.🎉

Handy links:

@ghost commented on GitHub (Oct 20, 2021): :tada:This issue was addressed in #11153, which has now been successfully released as `Windows Terminal Preview v1.12.2922.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.12.2922.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14618