# LibTmux.Session.new_window!/4

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/00d34b3d387da72a5a416f1dd3962a98c76cedd2/lib/libtmux/entities.ex#L155
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-session-new_window-bang-4/

```
new_window!(server, ref, name, options \\ [])
@spec new_window!(
        LibTmux.Server.t(),
        LibTmux.Ref.t(),
        binary(),
        [LibTmux.Action.creation_option()]
      ) ::
        LibTmux.Action.creation_value()
```

Returns the created window value when `new_window/4` completes; raises the original error otherwise.

## Parameters

- `server` (`LibTmux.Server.t()`)
- `ref` (`LibTmux.Ref.t()`)
- `name` (`binary()`)
- `options` (`[LibTmux.Action.creation_option()]`)
  Default: `[]`.

## Guides

Pages that discuss `new_window!/4`.

- [Getting started](/en/elixir/latest/guides/overview/)
