davidscholberg / tmux-cluster

tmux wrapper/plugin that aims to be fully compatible with clusterssh clusters configs
GNU General Public License v3.0
57 stars 16 forks source link

Ability to turn off sync as needed #2

Closed challsted closed 9 years ago

challsted commented 9 years ago

When I launch a session of lets say 4 servers, tmc does a great job of opening up 4 evenly spaced boxes.

But if I need to type something separate into each one of them, (or only one of them) I have no ability to turn off synchronize panes. I have tried using my keybinding that works in sessions i launch manually, and I have attempted to type out the command (:setw synchronize-panes off) it still broadcasts to them all.

davidscholberg commented 9 years ago

Hmm, this is strange. I've had no trouble enabling and disabling pane synchronization on tmux sessions that tmux-cluster creates. Those session shouldn't behave any differently than sessions created manually.

My only guess as to the cause of this issue is that you are maybe running tmux-cluster from within an attached tmux session. Doing this causes tmux-cluster to create the new session in a nested tmux instance (I still haven't figured out why). When this happens, pane synchronization commands will only apply to the outer tmux instance, and the inner tmux instance, which is where the cluster session is, will remain unaffected. If you have been running tmux-cluster from within an attached tmux session, then try instead to detach from the current tmux session first and then run tmc (as I recommend in the README).

Does this solve your issue?

challsted commented 9 years ago

Yes, that works great! I forgot you mentioned that you cant launch from within an existing session. Go ahead and consider this closed then, I appreciate your help :)

Would be nice regardless to be able to open a session, and create these from within said session. Even with sync permanently being on, its helpful if i do need to do something inside of all of the servers and not variate between them, just not idea.

davidscholberg commented 9 years ago

Awesome, glad to hear you sorted that out.

Yes, I absolutely agree that it would be nice if you could use tmux-cluster from within an attached tmux instance. In fact, ideally I would like to make tmux-cluster available as a tmux plugin, but when I tried to implement that before, there were some strange issues that prevented it from working properly. I am looking into these issues, though, so hopefully it won't be too long.

davidscholberg commented 9 years ago

Hey @hackinginformation, I just wanted to give you a heads up that I fixed that issue with running tmux-cluster inside an attached session. Further, I've added tmux plugin support for tmux-cluster, and I've updated the README with instructions for installing and using the plugin. Just thought you might be interested.

challsted commented 9 years ago

:D @davidscholberg thanks very much! I seen your post on reddit and thanked you for your push to get this done there too, Im actually just now setting it up (just got to work to do so)