terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Add support for `tmux` Control Mode

Open zadjii-msft opened this issue 5 years ago • 19 comments

From discussion in #532, #1000:

If we're looking at tmux for things like splits, why not implement Tmux Control Mode like iTerm on MacOS. I switch back and forth between my Macs (with iTerm2) and my Surface Laptop with WSL but WSL2 combined with a really usable terminal (comparable to iTerm2) would really make me consider leaving the Apple camp.

In #532, from @zadjii-msft:

I did not know that Tmux Control Mode even existed. That sounds really awesome, I'm totally on board with trying to make that work somehow.

Was there any further thought put into this? I love tmux control mode - it's literally the only thing keeping me tethered to MacOS at work (since only iTerm supports it, and iTerm is mac-only). If it were implemented, I'd trash my Mac and request a Windows laptop immediately.

I'd love to see it listed as a post-1.0 milestone :)

We should do this.

Docs link: https://github.com/tmux/tmux/wiki/Control-Mode

zadjii-msft avatar Nov 21 '19 18:11 zadjii-msft

Control mode isn't documented all that well but it isn't terribly complicated, if you want to do it you can feel free to ask me if you have questions.

nicm avatar Nov 26 '19 15:11 nicm

@nicm Thanks! Maybe we can contribute a bit to the existence of control mode docs while we're at it. :smile:

DHowett-MSFT avatar Nov 26 '19 19:11 DHowett-MSFT

That would be great. There is an overview in the manual and it is easy enough to play with interactively using "tmux -C new" (instead of -CC). Plus iTerm2 has an implementation of the client side of course.

nicm avatar Nov 26 '19 19:11 nicm

I was actually just looking at Tmux Control Mode for work (which led me to this issue from Google) - this would be something I would really support! That, and there are already library implementations which might help; as @nicm mentioned iTerm2 implements control mode, and also I found this python library https://libtmux.git-pull.com/en/latest/ which implements the control mode client, too.

ArcticLight avatar Dec 13 '19 21:12 ArcticLight

I don't think libtmux uses control mode.

nicm avatar Dec 16 '19 15:12 nicm

I have written a wiki entry about control mode, although it doesn't have an awful lot more than is in the manual at the moment. Still suggestions welcome - https://github.com/tmux/tmux/wiki/Control_Mode.

nicm avatar Jan 13 '20 14:01 nicm

I would love to have this feature - it's one of the crucial things I miss from my MacOS days. For those who end up here - push that Like button above! Let's make ourselves heard, surely the product team will notice this! :D

muodov avatar Mar 17 '20 12:03 muodov

I think this depends heavily on the remoting abiliby in #7240 & #8135. A tmux window will have to be a different one than the window that executes tmux -CC. And they must be able to communicate with each other.

skyline75489 avatar Mar 03 '21 11:03 skyline75489

One thing that prevent me from moving from Mac to Windows is the iTerm tmux control mode

joexue avatar Nov 30 '21 17:11 joexue

See also https://github.com/wez/wezterm/pull/1090

skyline75489 avatar Dec 01 '21 03:12 skyline75489

Update: part of this PR https://github.com/wez/wezterm/pull/1090 has been merged into main branch. But I think on Windows the tmux-cc feature in wezterm is still blocked by ConPTY. Haven't got the chance to try it, though.

skyline75489 avatar Jan 19 '22 03:01 skyline75489

This would be so helpful! Any update/progress?

jayPare avatar Mar 31 '22 02:03 jayPare

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? image That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

zadjii-msft avatar Mar 31 '22 10:03 zadjii-msft

This would be so helpful for me! Any update/progress?

+1

joexue avatar Jun 24 '22 14:06 joexue

+1 for tmux control mode!

This is implemented on iTerm2 for MacOS, and it's crazy magic that gives a native feeling to working with a remote server over SSH. It's also nice because sessions are persistent across disconnect/reconnect.

If Windows Terminal learned how to use control-mode, I'd switch my work computer over in an instant. And I don't think I'm the only one.

nrclark avatar Oct 15 '22 01:10 nrclark

It'd make so much sense since Windows Terminal already supports split panes, it'd fit perfectly <3 please support this @Microsoft

shinebayar-g avatar Dec 07 '22 22:12 shinebayar-g

Any update on this? I use iterm2 exclusively because of this integration

BinaryShrub avatar Jan 18 '24 18:01 BinaryShrub

Any update on this? This is the most wanted feature!

iDarshan avatar Mar 07 '24 19:03 iDarshan