terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Add tmux 'resize pane -Z' functionality to Windows Terminal pane managment

Open MOrlassino opened this issue 6 years ago • 2 comments

Description of the new feature/enhancement

Consider extending the (awesome 🎉) Windows Terminal split pane functionality to add one more feature inspired from tmux (or Byobu), that is allowing the end-user to toggle maximizing and minimizing the size of a pane.

An excerpt from a tmux man page: (resize-pane -Z) -> "With -Z, the active pane is toggled between zoomed (occupying the whole of the window) and unzoomed (its normal position in the layout)."

IMO, developers, and sysadmins that typically use split pane functionality also find it convenient to transition to a maximized pane for specialized tasks (running man, tail, ls -alF, kubectl describe, top, etc.). Once complete with the specialized task, these users, restore the pane layout to what they had previously. The transitions in layout are performed via keyboard shortcuts.

While Windows Terminal does presently have split pane functionality it currently has no functionality which would support the common usage scenario as outlined above.

Proposed technical implementation details (optional)

With current pane (i.e. pane with console in focus) if not maximized then save current pane size and maximize pane and annotate tab title with text prefix '(Z)' else restore previously saved pane size and remove '(Z)' text from tab title.

Summary of pane actions:

"alt+shift+z" = zoom/unzoom (maximize, unmaximize) "alt+shift+-" (minus sign) = split the pane vertically "alt+shift+|" (pipe/vertical bar symbol) = split the pane horizontally "ctrl+shift+w" = close pane

Changes/additions to the Windows Terminal defaults.json file:

// Pane Management
{ "command": "closePane", "keys": "ctrl+shift+w" },
{ "command": { "action": "splitPane", "split": "horizontal" }, "keys": "alt+shift+-" },
{ "command": { "action": "splitPane", "split": "vertical" }, "keys": "alt+shift+|" },
{ "command": { "action": "toggleMaxPane", "keys": "alt+shift+z" },

🔚

MOrlassino avatar May 07 '20 14:05 MOrlassino

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #996 for more discussion.

/dup #996

zadjii-msft avatar May 07 '20 14:05 zadjii-msft

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 avatar May 07 '20 14:05 ghost