-
Notifications
You must be signed in to change notification settings - Fork 257
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 Control Mode (squashed) #378
Conversation
Wow, thanks for this. I'll pull this in and take a look at it as soon as I can, and hopefully I can help you work through the remaining issues. |
Seems to work so far, and the test failing is a simple fix. What specifically is not working? |
This squashes the original commits from launchpad in 2016, since I was unable to merge the complete history. The main work has been done by Andrea and Dan: https://bugs.launchpad.net/terminator/+bug/1301605 For reference, this branch has the history from lp: https://github.com/manno/terminator/tree/tmux Co-authored-by: Andrea Fagiani <[email protected]> Co-authored-by: Dan Kilman <[email protected]>
imports, strings/bytes, -M already being used
So back then, the decision was made to develop tmux support mostly independent of the main code path. Clients like iterm2 detect tmux control sequences and open a new window ( So It also means, the code in this PR won't execute unless terminator is started with
I'm not sure how to fix that, but if it's complicated to fix, I'd suggest to just detect the escape sequences and react to them and throw all the popen ssh/tmux code away. |
Just checking in to say I'm pretty busy starting a new job right now, but I'll take a look as soon as I can. I haven't forgotten about this. |
I actually think the "bypass" approach makes a lot of sense in terms of usability since it would otherwise require an inter-window communication method and add more UX concerns. I'm hoping to find some time this weekend to go through the MR and get it working :) |
So I've spent a couple of days getting this working. It's mostly usable at a basic level, but only if there is only one client connected at any one time. In short, the code is able to push all (most) state changes from Terminator to tmux, but it's not able to react to changes made by either an attached tmux instance or other Terminator instances attached to the same session. If your workflow only involves having one backing headless instance of tmux running at all times and connecting/disconnecting one Terminator instance at a time, then this should be fine. There are a few really gnarly incompatibilities between Terminator's features and what tmux allows. As an example, in Terminator you can change the zoom level of all panes independently, which is impossible in tmux. Doing it leads to very odd behaviour where a terminal appears to have a certain height×width, but the backing tmux pane is actually smaller/bigger, and text wraps in odd ways in the other panes. I'll do some more cleanup and submit a separate PR. Maybe we can still include it with some caveats. I wish I had a Mac to test how iTerm2 deals with all of this. |
I'm going to close this one, as we're now working on #408 |
This is the tmux code from 2016 applied on top of the current master branch.
It's not functional yet.
(for #79)