Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux integration #37

Open
flying-sheep opened this issue Mar 18, 2016 · 5 comments
Open

tmux integration #37

flying-sheep opened this issue Mar 18, 2016 · 5 comments

Comments

@flying-sheep
Copy link

what iterm2 does is amazing, so let’s do that!

@withoutboats
Copy link
Owner

I'm not certain what iTerm2 is doing here, but whenever I read that a terminal has an 'integration,' my first thought is 'layering violation.'

tmux -CC opens tmux in a mode called 'control mode,' which is documented here. This seems to be some sort of custom client/server protocol for communicating with tmux that is distinct from ANSI protocol, and designed for the kinds of integration that iTerm2 provides.

It's conceivable, if this protocol is robust, well-specified, and complete, that notty would implement a client for this protocol, to interact with terminal multiplexers. This would not be a tmux-specific integration, it would be a different way of transmitting commands between notty and the controlling process. There's not enough documentation on tmux's man page (and I haven't found any other documentation yet) for me to tell exactly how this protocol works.

The exact implementation in iTerm2, where when you run tmux -CC through an iTerm2 terminal, it connects that to another window, is unlikely to be implemented as a part of notty. But some other interface is conceivable if the underlying protocol is good.

That said, rather than focusing on the integration with tmux, its worth asking:

  • What does iTerm2's tmux integration do that we like?
  • How can we structure the protocol notty uses to either implement or enable that feature in a way that interacts well with notty's other features?

Possibly, implementing a client for tmux's protocol is the general purpose answer, but possibly there's something else we could do instead / as well.

@flying-sheep
Copy link
Author

my idea is separation of concerns: instead of providing windows, panes, scrollback, … it could be deferred to tmux.

just food for thought, no more.

@withoutboats
Copy link
Owner

My impression of iTerm2's tmux integration (though I haven't used it extensively) is that it runs in the opposite direction: it provides tmux's decoupling ability (so that when you close the window, the tty doesn't die) while using iTerm2's display features.

@flying-sheep
Copy link
Author

yes, that’s what i meant:

Element iTerm2 + tmux terminal emulator TTY
interface OS window OS window screen
inside tmux window scrollback buffer scrollback buffer
close btn detaches kills process running in terminal N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@flying-sheep @withoutboats and others