Joining panes
In addition to linking windows between one session and another, you can also do something called joining panes. The name can seem a bit misleading at first, but essentially, this is used to take a pane in one window and move it to another window.
It can be used to move one pane in a multipaned window to another window, but it can also be used to take a window, which has only one pane, and join it with another (now its name is probably a bit less misleading). This is very useful if you have two windows running different things but decide you'd prefer them as two panes of the same window.
For example, let's say we have a pane running in one window and we want to join it with another window. In the simplest case, we could switch to the pane we want to join and run the command join-pane -t :1
where :1
indicates that we want the window in index 1 in the current session. After running this command, the window index 1 in the current session will have the contents of any panes it had...