# LibTmux.FSharp.Chain

- **Module:** LibTmux.FSharp
- **Package:** LibTmux.FSharp
- **Language:** F#
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.FSharp/Hierarchy.fsi#L406
- **Page:** https://libtmux.org/en/fsharp/latest/reference/libtmux-fsharp-chain/

```
module Chain
```

Builds commands tmux runs together, each acting on what the one before made.

tmux moves its current target as a chain runs: <c>newWindow</c> makes the
new window current, a following split splits its pane, and a following
<c>sendLine</c> types into the pane that split made. No step after the
first names a target, so a chain needs no round trip to learn the id of
what it just created.

A chain is a core <c>TmuxChain</c>: each step returns a new one, building
reads nothing, and <c>run</c> sends every command in one tmux invocation.
<c>add</c> appends any command, such as a typed request's <c>ToCommand</c>.

## Members

### Common operations

- `add` (function): Appends any command, such as a typed request's <c>ToCommand</c>.
- `arrange` (function): Arranges the current window with a tmux layout; the chain checks the name before tmux sees it.
- `newWindow` (function): Adds a window to a session and makes it the one following steps act on.
- `run` (function): Runs every command in one tmux invocation and returns tmux's combined answer.
- `sendLine` (function): Types a line into the current pane and presses Enter.
- `splitLeftRight` (function): Splits the current pane into a left and a right one; the right becomes current.
- `splitTopBottom` (function): Splits the current pane into a top and a bottom one; the bottom becomes current.
- `start` (function): Starts an empty chain against a server.
