# client.Client.attached_window

- **Module:** client.Client
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/client.rs#L349
- **Page:** https://libtmux.org/reference/rs/client-client-attached_window/

```
client.Client.attached_window(self) -> Result<Option<crate::Window>, Error>
```

The current window of the session this client is attached to.

Not this client's own view. tmux keeps the current window on the
session -- `curw` is a member of `struct session`, not of
`struct client` -- so every client attached to one session reports the
same window, and one client changing it changes it for all of them.

`None` when the client is attached to nothing.

# Errors

Returns an error when tmux cannot be reached, or answers with an ID
this crate cannot parse.
