# libtmux.Pane.join

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pane.py#L2351
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-join/

tmux command: [`join-pane`](/en/tmux/latest/manual/join-pane/)

```
libtmux.Pane.join(
    self,
    target: str | Pane | Window,
    vertical: bool = True,
    detach: bool = True,
    full_window: bool | None = None,
    size: str | int | None = None,
    before: bool | None = None,
) -> None
```

Join this pane into another window/pane via [`$ tmux join-pane`](/en/tmux/latest/manual/join-pane/).

This is the inverse of :meth:`break_pane`.

## Examples

```python
>>> pane_to_join = window.split(shell='sleep 1m')
>>> new_window = pane_to_join.break_pane()
>>> pane_to_join.join(window)
```

## Parameters

- `target` (`str | Pane | Window`): Target pane or window to join into.
- `vertical` (`bool`): Join vertically (``-v`` flag), default True. Set to False for
horizontal (``-h``).
- `detach` (`bool`): Do not switch to the target window (``-d`` flag), default True.
- `full_window` (`bool | None`): Join spanning the full window width/height (``-f`` flag).
- `size` (`str | int | None`): Size for the joined pane (``-l`` flag).
- `before` (`bool | None`): Place the pane before the target (``-b`` flag).

## In other ports

### Move a pane into another window

- Ruby: [`LibTmux::Pane#join`](/en/ruby/latest/reference/libtmux-pane-join/) (method)
- TypeScript: [`pane.Pane.joinTo`](/en/ts/latest/reference/pane-pane-jointo/) (method)
- Go: [`tmux.Pane.Join`](/en/go/latest/reference/tmux-pane-join/) (method)
- Java: [`io.github.libtmux.Pane.Pane.joinTo`](/en/java/latest/reference/io-github-libtmux-pane-pane-jointo/) (method)
- C#: [`LibTmux.Pane.JoinAsync`](/en/csharp/latest/reference/libtmux-pane-joinasync/) (method)
- C++: [`libtmux::Pane::join`](/en/cxx/latest/reference/libtmux-pane-join/) (method)
- Swift: [`Server.join(_:into:direction:size:)`](/en/swift/latest/reference/server-join(_-into-direction-size-)/) (method)
