# LibTmux.Program.screen/2

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/program.ex#L241
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-program-screen-2/

```
screen(program, timeout \\ 5000)
@spec screen(t(), 1..600_000) ::
        {:ok,
         %{
           screen: binary(),
           history: %{
             retained: non_neg_integer(),
             discarded: non_neg_integer()
           }
         }}
        | {:error, LibTmux.Error.t()}
```

Reads the current rendered screen of this application pane.

The result excludes retained history. Its counters describe how many
history rows tmux retains and how many it has discarded.

## Parameters

- `program` (`t()`)
- `timeout` (`1..600_000`)
  Default: `5000`.

## Guides

Pages that discuss `screen/2`.

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