greymd / tmux-xpanes

Awesome tmux-based terminal divider
MIT License
1.96k stars 61 forks source link

Feature: Reuse existing panes previously created by -x #198

Open jmeurin opened 12 months ago

jmeurin commented 12 months ago

Frequently, I run xpanes -x <2 processes that communicate with each other>. I have scripts to send command to various tmux panes but I'd like to run xpanes -r <2 processes that communicate with each other> and reuse the panes that were created by the first -x run.

I've coded it already locally and I think others may be interested.

greymd commented 11 months ago

@jmeurin Hi, sorry for the late reply.

That's an interesting idea but I have a few concerns.

For example, as far as I checking your comment, xpanes may have to remember the pane prepared by -x. In other words, we have to make the xpanes have stateful behavior. Stateful behavior would make the code more complex and I do not prefer to implement it. On the other hand, if -r has a simple behavior like "just resend commands to all panes except for own pane," it may be useful.

jmeurin commented 9 months ago

Sorry for my even later reply. I created https://github.com/greymd/tmux-xpanes/pull/199.

It keeps xpanes stateless and matches the behavior you described last.

I apologize but I don't have the ability to run the tests :-(