# LibTmux.Server.movePane

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/src/LibTmux/Server.hs#L794
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-server-v-movepane/

```haskell
movePane
  :: Server
  -> PaneOccurrence
  -> PaneOccurrence
  -> PaneMoveOptions
  -> IO PaneRelocationReceipt
```

Signature types: [`Server`](/en/haskell/latest/reference/libtmux-server-t-server/), [`PaneOccurrence`](/en/haskell/latest/reference/libtmux-snapshot-t-paneoccurrence/), [`PaneMoveOptions`](/en/haskell/latest/reference/libtmux-creation-t-panemoveoptions/), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO), [`PaneRelocationReceipt`](/en/haskell/latest/reference/libtmux-creation-t-panerelocationreceipt/).

Move a running pane relative to a destination pane in another window.
 Both occurrences must still name their exact session/index links. Native
 movement of the last pane removes the source window and all its links.

## Referenced declarations

- [`LibTmux.Creation.PaneMoveOptions`](/en/haskell/latest/reference/libtmux-creation-t-panemoveoptions/) (data type)
- [`LibTmux.Snapshot.PaneOccurrence`](/en/haskell/latest/reference/libtmux-snapshot-t-paneoccurrence/) (data type)
- [`LibTmux.Creation.PaneRelocationReceipt`](/en/haskell/latest/reference/libtmux-creation-t-panerelocationreceipt/) (data type)
- [`LibTmux.Server.Server`](/en/haskell/latest/reference/libtmux-server-t-server/) (data type)

## tmux command

The tmux commands behind `movePane`.

- [`if-shell`](/en/tmux/latest/manual/if-shell/)
- [`move-pane`](/en/tmux/latest/manual/move-pane/) (when both pane occurrences match)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_if_shell_entry`](/en/tmux/latest/reference/c-variable-cmd_if_shell_entry/) (attribute)
- [`cmd_if_shell_exec`](/en/tmux/latest/reference/c-function-cmd-if-shell-c-cmd_if_shell_exec/) (function)
- [`cmd_move_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_move_pane_entry/) (attribute)
- [`cmd_join_pane_exec`](/en/tmux/latest/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function)
