# `Linx.Tty.WindowSize`
[🔗](https://github.com/oshlabs/linx/blob/v0.2.0/lib/linx/tty/window_size.ex#L1)

The size of a terminal — rows, columns, and optional pixel
dimensions. The shape of `struct winsize` from `<sys/ioctl.h>`.

Returned by `Linx.Tty.window_size/1`; passed to
`Linx.Tty.set_window_size/2` and `Linx.Process.pty_set_winsize/2`.

`rows` and `cols` are what every terminal-aware program cares about
(`vim`, `top`, `less`). `xpixel` / `ypixel` are the legacy
pixel-dimensions fields — almost always reported as `0` by modern
terminal emulators and ignored by most consumers; included for ABI
faithfulness so a relay (e.g. `Linx.Tty.attach/2`) can shuttle the
full struct.

# `t`

```elixir
@type t() :: %Linx.Tty.WindowSize{
  cols: non_neg_integer(),
  rows: non_neg_integer(),
  xpixel: non_neg_integer(),
  ypixel: non_neg_integer()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
