-
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 v2 #408
base: master
Are you sure you want to change the base?
Tmux control mode v2 #408
Conversation
This is 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, python3 strings/bytes, -M already used
multiprocessing.Queue actually has to pickle everything that goes through it. This is not possible in all cases, so the callbacks were not being added. This commit switches to an implementation that can instead find the needed function by name.
Not doing this results in double keypresses
Properly decode everywhere
Make a copy of removed pane ID keys, cleanup
Make PID an integer
Ah, some tests are failing 😆 Didn't even notice those. I'll take a look later! |
This is huge, but I think this'll be a real differentiator. I don't personally use tmux, so I may ask a bunch of questions in the process of checking it out. I have a mac with iTerm2 as well, so I may be able to help you out there. I'm usually hanging out on https://gitter.im/gnome-terminator/community if you want to chat about this. It's going to take a while to go through all the code, and just make sure I can understand at least the interface to the rest of terminator, if not understand the tmux code. Thank you so much for this, it's why I love working on open source projects. |
No worries! Honestly the majority of the credit goes to Manno and the original contributors.
I still feel like this approach might not be right and we might want to switch to a model where Tmux is driving the entirety of the logic, but that's a bit too far for me and my limited free time! :P
…On Sun, Mar 21, 2021, at 19:24, Matt Rose wrote:
This is huge, but I think this'll be a real differentiator. I don't personally use tmux, so I may ask a bunch of questions in the process of checking it out. I have a mac with iTerm2 as well, so I may be able to help you out there. I'm usually hanging out on https://gitter.im/gnome-terminator/community if you want to chat about this. It's going to take a while to go through all the code, and just make sure I can understand at least the interface to the rest of terminator, if not understand the tmux code.
Thank you so much for this, it's why I love working on open source projects.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#408 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEUSPLWNIBO7U26QPYVI6CTTEZ52RANCNFSM4ZSBKJFQ>.
|
Maybe you, or somebody else will come along and pick it up later and make more improvements, but If we can get this to a fit state where it can be released, that's a huge step, and will make it easier for later contributors. Thanks again. |
Yay, tests pass! |
Hey @mattrose! Did you get a chance to try this out? |
Sorry I've been busy lately, and I wiped my normal terminator development machine, and it dropped off my radar a bit. I'll see if I can take a look today or tomorrow. |
hmm, I get this error when running terminator -t Traceback (most recent call last): Is that a dependency for tmux? |
Installed pyparsing and noticed one glaring thing which is that debug output is outputted constantly. Also, I'm not sure how to use it with tmux. I tried I tried running tmux in a separate window, and tried terminator -t, and that just hung. |
Ah yes, my bad -- I'll add it to As for the rest I'll try to take a look today. I started it again today and it's just... not working. Sigh. I might end up re-implementing this from scratch. And sorry about the debug messages, I thought I had removed all the useless ones during a cleanup, but I missed a bunch. |
@iamjackg Thank you a lot for working on this feature, which could be killer-feature for terminator. I've tried this MR today, and yes, terminator runs some tmux'es, but I cannot type anything. When I open new tab, I can see it in P.S. And |
Just an update -- I haven't forgotten about this, I just haven't had much time to work on it. I started a complete rewrite that separates out the tmux control code into a separate library, because in its current form it's way too tied to the rest of the terminator code. |
Thanks so much for staying with this. |
I left a comment about this on #79. |
This is a cleanup of #378. A lot of changes went into this.
I spent the last couple of days getting it 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
xwidth
, but the backing tmux pane is actually smaller/bigger, and text wraps in odd ways in the other panes. I ended up disabling zooming and drag&drop altogether when in tmux mode.There are other issues: tmux's window size includes all the pane separators, so if you set a client size of 80x20 and then split it in two you don't get two 40x20 terminals, but one 39x20 and one 40x20, because the vertical separator takes up a column. Terminator determines its window size excluding the separator(s). I tried to add functionality to keep them in sync, but this doesn't always work.
Feel free to give it a try and see if it works fine for you.