Reputation: 361
I wonder if I can configure a pane in tmux to appear in all windows.
Any hints how to do that?
Upvotes: 11
Views: 4920
Reputation: 91
Here's a way to do this, but the mirrored panes will be read-only. There's the pipe-pane
command which sends the pane's output to a command. You can have that command write the output to a file and then from the panes you want to mirror from, you can tail -f
that file. Example:
# In source pane
tmux pipe-pane 'cat > /tmp/asdf'
# In the target pane (or another tmux session or terminal window)
tail -f /tmp/asdf
Upvotes: 6
Reputation: 3518
Of course this is possible, but you would need to run tmux inside a tmux pane.
+-------------+-------------+
| tmux pane 1 | tmux pane 2 |
| | |
| |+-----------+|
| || new tmux ||
| || session ||
| |+-----------+|
+-------------+-------------+
How to do it:
unset TMUX
in pane 2 # this allows tmux in tmuxtmux attach -t <target-session>
# this is opens the shared sessionThis does not work as easily if you are running wrappers for tmux, such as come with oh-my-zsh or tmuxinator. And there are probably many reasons you shouldn't do it, I just don't know any of them.
Upvotes: 6
Reputation: 300
no you can't configure a pane to be linked to every window in a traditional sense but you can use tmux's link-window
functionality to achieve much of this effect. wrap it in a script or tmux session file to link it to many windows at once.
**edit
you will also want to use the join-pane
feature.
Upvotes: 2