# libtmux::Window::layout

- **Module:** libtmux::Window
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L530
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-window-layout-srt0/

```
libtmux::Window::layout() -> std::string_view
```

An opaque token: hand it back to `select_layout` exactly as received, and do not parse its shape.

tmux 3.8+ reports JSON here for a plain client, and keeps the classic layout string for a control client unless that client has asked tmux for JSON with `refresh-client -f / new-layouts` — which `Connection::connect` sends on every connection, so control mode through this library gets JSON on 3.8+ too.

A version's own `layout()` output round-trips through its own `select_layout` on that version; see that method's comment for what "round-trips" promises and what it does not.
