# window.Window

- **Module:** window
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/window.rs#L114
- **Page:** https://libtmux.org/reference/rs/window-window/

Windows compare by server endpoint, session, index, and window id.

Equality follows the link, not the window, because a linked window occupies
a genuinely different position in each session that holds it. Compare
[`Window::id`] directly to ask whether two handles name the same underlying
window.

## Members

- `new` (method) — Build a handle from a hydrated projection.
- `from_env` (method) — Find the window this process is running in.
- `from_env_value` (method) — Find a window from an explicit `TMUX_PANE` value.
- `id` (method)
- `session_id` (method)
- `index` (method)
- `name` (method)
- `pane_count` (method)
- `width` (method)
- `height` (method)
- `layout` (method)
- `is_active` (method)
- `is_linked` (method)
- `has_activity` (method)
- `has_bell` (method)
- `last_activity` (method)
- `is_zoomed` (method)
- `server_identity` (method) — Return the identity of the server this window belongs to.
- `refresh` (method) — Replace this handle's snapshot with the window's current state.
- `refreshed` (method) — Return a new handle holding the window's current state.
- `split` (method) — Split this window and return the new pane.
- `rename` (method) — Rename the window and update this handle.
- `select` (method) — Make this window active in the session it was reached through.
- `select_layout` (method) — Set the window's pane layout.
- `respawn` (method) — Restart the window's command in place.
- `next_layout` (method) — Move to the next named layout, and return the window.
- `previous_layout` (method) — Move to the previous named layout, and return the window.
- `rotate` (method) — Move the window's panes round one position, keeping the layout.
- `kill` (method) — Kill the window, closing it in every session that links it.
- `unlink` (method) — Remove this session's link to the window, leaving other links intact.
- `cmd` (method) — Run a raw tmux command against this window.
- `format` (method) — Expand a tmux format string in this window's context.
- `display` (method) — Show a message on the clients viewing this window.
- `with_pane` (method) — Create a pane, run an operation with it, then kill it.
- `swap_with` (method) — Swap this window's position with another.
- `move_to` (method) — Move this window to an index, possibly in another session.
- `resize_by` (method) — Resize the window to an exact size in cells.
- `link_to` (method) — Link this window into another session, so both hold the same window.
- `resize` (method) — Resize the window to an exact size in cells.
