wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.75k stars 751 forks source link

Support tmux control mode #336

Open wez opened 3 years ago

wez commented 3 years ago

tmux offers a control mode that allows a terminal emulator to issues commands and react to events happening in a tmux server through the terminal input/output streams.

This issue tracks adding support for this control mode such that it is treated as a multiplexer domain within wezterm, allowing wezterm to connect to a tmux instance and render native windows, tabs and panes for the "remote" tmux session(s).

The basics:

For a well integrated feature:

wez commented 3 years ago

@bcully started work on this a while back, and since then wezterm has evolved splits/panes and changed some guts around. I have a local branch with some improved foundations for tmux as a domain, which I want to keep in master so that we can avoid bit rot and chip away at it more incrementally.

joexue commented 2 years ago

still think this feature is very useful even we have Wezterm native multiplex. For example, we cannot install Wezterm on the server while tmux is already there.

joexue commented 2 years ago

Someone created a same function in hyper, looking forward to this feature in wezterm

https://www.reddit.com/r/commandline/comments/q5mj11/htm_a_cross_platform_alternative_to_tmux_control/

HTM - A cross platform alternative to tmux control mode

Hey all! I'm the creator of Eternal Terminal ( www.eternalterminal.dev ), a replacement for ssh/mosh that survives network failures while still supporting port forwarding and native scrolling.

I'm looking for some folks to try out a new utility: Headless Terminal Multiplexer (HTM). If you have used the amazing tmux control mode (tmux -CC) with iTerm on OS/X, then you know how nice it is to have a tmux experience with native tabs and scrollbars. HTM brings this same experience to Linux and Windows (and OS/X), using the Hyper.js terminal program. It's been working reliably for me, but I haven't shared it with anyone else yet. Please try it out and give me feedback, thanks!

stefandxm commented 1 year ago

Any news about this?

snaggen commented 1 year ago

While the wezterm multiplexter looks really good, I'm never able to use it since I always work on customer servers where I'm not allowed to install software of my picking. However, they almost always have tmux installed, so having tmux support in wezterm would be really nice. So, I hope this is something that is still on the roadmap, since wezterm is a really nice terminal.

alxzh commented 1 year ago

Can we prioritize this? With Eternal Terminal + tmux-cc (with is very mature and works flawlessly with iTerm) wezterm doesn't need to invest into tls domain and other tmux-cc would work nicely.

wez commented 1 year ago

@alxzh who is we? Are you a company willing to sponsor people to do the work on this?

alxzh commented 1 year ago

Sorry for now being clear :) I'm an individual. But I can help with working on that code to try to get it to merge into the main.

wez commented 1 year ago

I consider this to be a fairly big chunk of work. There are pieces in the repo today, but I think the approach should be re-thought, perhaps in concert with thinking about the scrollback design in https://github.com/wez/wezterm/issues/1342 and that together with how the multiplexer client works to try to reduce some code duplication and make things easier overall.

I do welcome contributions from others here, but I want to be up front that it will be a big time commitment both for them and for me to review and shepherd the work. I'd like to avoid us both investing a lot time and only producing partial results as has happened so far; the contributions have all be valuable and helped to figure out what this feature kinda looks like, but we obviously haven't successfully completed it yet.

For me personally: I do not have a lot of time for this particular feature, and since I don't use tmux any more (I built wezterm to replace my usage of tmux and it has been successful at that), I don't have motivation to spend my spare time on this, but I could make time for it if my GH sponsorship goal (https://github.com/sponsors/wez) was closer to being realized.

vzaliva commented 5 months ago

I am very interested in this feature. Currently, to the best of my knowledge, no Linux terminal supports this, and it is often asked for. (On MacOS, iTerm has it.) Unfortunately, the wezterm current solution does not work for me as I do not have privileges to install server-side support on many hosts I log into.

I understand how open-source works and how precious little time people could contribute. I appreciate all the other work and features and want to explain why this feature may be attractive to many users. Again, thanks for all your work!