# LibTmux.WindowLink.unlink/3

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/entities.ex#L459
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-windowlink-unlink-3/

```
unlink(connection, ref, options \\ [])
@spec unlink(LibTmux.Action.connection(), LibTmux.Ref.t(), [
        LibTmux.Action.membership_option()
      ]) ::
        {:ok, LibTmux.Action.result(:ok)}
        | {:error, LibTmux.Action.error()}
```

Removes one observed session/index/window binding.

tmux checks the full tuple and unlinks in the same command queue. A missing
or reoccupied slot returns `:stale_target`. tmux refuses removal of
the physical window's final link, and may close a session that loses its
sole window while the window remains linked elsewhere.

This action uses a Server with the usual incarnation check/use race.
A Control connection returns `:unsupported_transport`. A grouped session
returns `:grouped_session`, since unlinking would also change its peers.
The default timeout is 5000ms. A newly created binding with the same
tuple is indistinguishable from the original.

See the [worked example](one-shot-actions.html#share-a-physical-window).

## Parameters

- `connection` (`LibTmux.Action.connection()`)
- `ref` (`LibTmux.Ref.t()`)
- `options` (`[LibTmux.Action.membership_option()]`)
  Default: `[]`.
