Support HTM (headless terminal multiplexer) for remote pane/tab management #7368

Open
opened 2026-01-31 01:02:08 +00:00 by claunia · 3 comments
Owner

Originally created by @matt-kempster on GitHub (Apr 11, 2020).

Description of the new feature/enhancement

As mentioned in #3656, it would be great to have tmux control mode support for Windows. More abstractly, it would be especially great if there was remote pane/tab management available at all, through any terminal multiplexer (not just tmux). In fact, @MisterTea's EternalTerminal has such a terminal multiplexer called "HTM" (headless terminal multiplexer). It is being adopted by Hyper.js (see https://github.com/zeit/hyper/pull/2988) and would seem to have a simpler client-side implementation than tmux control mode.

To be extra clear: I really want to be able to open a connection to a remote machine, then use Windows Terminal to split a pane in two, revealing two terminal inputs for the same remote machine - or use a new tab hotkey do to the same for a tab instead of a pane. It seems like HTM might be an easy way to go forward.

Proposed technical implementation details (optional)

I'm not sure. Maybe @MisterTea would have some ideas. But from a quick glance through the HTM source code, it would appear that one might start by parsing and interpreting its header codes.

Originally created by @matt-kempster on GitHub (Apr 11, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 <!-- 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). --> As mentioned in #3656, it would be great to have `tmux` control mode support for Windows. More abstractly, it would be especially great if there was remote pane/tab management available at all, through any terminal multiplexer (not just `tmux`). In fact, @MisterTea's [EternalTerminal](https://github.com/MisterTea/EternalTerminal) has such a terminal multiplexer called "HTM" (headless terminal multiplexer). It is being adopted by Hyper.js (see https://github.com/zeit/hyper/pull/2988) and would seem to have a simpler client-side implementation than `tmux` control mode. To be extra clear: I really want to be able to open a connection to a remote machine, then use Windows Terminal to split a pane in two, revealing two terminal inputs for the same remote machine - or use a new tab hotkey do to the same for a tab instead of a pane. It seems like HTM might be an easy way to go forward. # Proposed technical implementation details (optional) I'm not sure. Maybe @MisterTea would have some ideas. But from [a quick glance through the HTM source code,](https://github.com/MisterTea/EternalTerminal/blob/6fb4daf82845c4dca4f609694a3ffb921fea25c3/src/htm/HtmHeaderCodes.hpp) it would appear that one might start by parsing and interpreting its header codes. <!-- A clear and concise description of what you want to happen. -->
Author
Owner

@MisterTea commented on GitHub (Apr 11, 2020):

The best way to see how to interact with HTM is to look at the Hyper.js client: https://github.com/MisterTea/hyper-htm/blob/master/index.js

At a high level, HTM lays out content like this:

  1. Array of tabs
  2. Each tab is a tree structure where the leaf nodes are terminals and the inner nodes are splits (e.g. a tab with a vertical split pane would have a split node with two terminal leafs)

In this way it's possible to make any hierarchy of panes in a tab. Each terminal is given a UUID so when data arrives on that UUID, it should be forwarded to that terminal.

I'm happy to help develop a plugin for windows terminal and answer any questions.

@MisterTea commented on GitHub (Apr 11, 2020): The best way to see how to interact with HTM is to look at the Hyper.js client: https://github.com/MisterTea/hyper-htm/blob/master/index.js At a high level, HTM lays out content like this: 1. Array of tabs 2. Each tab is a tree structure where the leaf nodes are terminals and the inner nodes are splits (e.g. a tab with a vertical split pane would have a split node with two terminal leafs) In this way it's possible to make any hierarchy of panes in a tab. Each terminal is given a UUID so when data arrives on that UUID, it should be forwarded to that terminal. I'm happy to help develop a plugin for windows terminal and answer any questions.
Author
Owner

@zadjii-msft commented on GitHub (Apr 13, 2020):

Sure, this seems reasonable was well. Added it to the list in #4000 (along with #3656) as possible types of extensions. Presumably they'd work as some type of enhanced ITerminalConnection object. Since we've already got a top-level list of tabs and a tree of panes underneath each tab, this seems like a natural fit.

@zadjii-msft commented on GitHub (Apr 13, 2020): Sure, this seems reasonable was well. Added it to the list in #4000 (along with #3656) as possible types of extensions. Presumably they'd work as some type of enhanced `ITerminalConnection` object. Since we've already got a top-level list of tabs and a tree of panes underneath each tab, this seems like a natural fit.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 17, 2020):

The same infrastructure would support tmuxcc, so I hope we do get a spec out of it! 😄

@DHowett-MSFT commented on GitHub (Apr 17, 2020): The same infrastructure would support tmuxcc, so I hope we do get a spec out of it! :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7368