# libtmux:windows

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/model.lisp#L49
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-windows/

```
(windows observation)

Primary method: libtmux:session:
(windows (session libtmux:session))

Primary method: libtmux:snapshot:
(windows (snapshot libtmux:snapshot))
```

Return a fresh vector of captured windows, without I/O.
Snapshot windows are physical entities in first-occurrence order. Session
windows contain one item per link and preserve repeated physical windows.

## Methods

### `(windows (session libtmux:session))`

### `(windows (snapshot libtmux:snapshot))`

## Parameters

- `observation` (for `windows(observation)`)
- `session` (`libtmux:session`) (for `Primary method: libtmux:session`)
- `snapshot` (`libtmux:snapshot`) (for `Primary method: libtmux:snapshot`)

## Guides

Pages that discuss `windows`.

### Concepts

- [Captures and identity](/en/lisp/latest/concepts/captures/)

### Guides

- [REPL tutorial](/en/lisp/latest/guides/tutorial/)

## In other ports

List a session's windows

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.windows`](/en/py/latest/reference/libtmux-session-windows/) (property) |
| Ruby | [`LibTmux::Session#list_windows`](/en/ruby/latest/reference/libtmux-session-list_windows/) (method) |
| PowerShell | [`LibTmux\Get-TmuxWindow`](/en/powershell/latest/reference/libtmux-get-tmuxwindow/) (cmdlet). Use the [`-Session`](/en/powershell/latest/reference/libtmux-get-tmuxwindow/#LibTmux%5CGet-TmuxWindow.parameter.Session) parameter set to acquire placements in one session. |
| Julia | [`LibTmux.windows`](/en/julia/latest/reference/libtmux-windows/) (function). `windows` with a captured `SessionSnapshot` reads distinct physical windows in that session. Use `windowlinks` for placements. |
| Erlang | [`tmux_snapshot:related/3`](/en/erlang/latest/reference/tmux_snapshot-related-3/) (function). Pass `windows`, a captured session and its snapshot for a local relationship read. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`session.Session.windows`](/en/ts/latest/reference/session-session-windows/) (method) |
| Rust | [`session.Session.windows`](/en/rs/latest/reference/session-session-windows/) (method) |
| Go | [`tmux.Session.Windows`](/en/go/latest/reference/tmux-session-windows/) (method) |
| Java | [`io.github.libtmux.Session.windows`](/en/java/latest/reference/io-github-libtmux-session-session-windows/) (method) |
| Clojure | [`libtmux.data/windows`](/en/clojure/latest/reference/libtmux-data-windows/) (function). Traverses one capture locally. It does not issue a list-windows command. |
| Kotlin | [`io.github.libtmux.kotlin.Session.windows`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-session-windows/) (property) |
| Scala | [`io.github.libtmux.scaladsl.Session.windows`](/en/scala/latest/reference/io-github-libtmux-scaladsl-session-windows/) (method) |
| C# | [`LibTmux.Session.Windows`](/en/csharp/latest/reference/libtmux-session-windows/) (property) |
| F# | [`LibTmux.FSharp.Session.windows`](/en/fsharp/latest/reference/libtmux-fsharp-session-windows/) (function). Builds a deferred window query from one `LibTmux.Session` and its server. `Query.list` acquires placements scoped to that session ID. |
| C++ | [`libtmux::Session::windows`](/en/cxx/latest/reference/libtmux-session-windows/) (method) |
| Swift | [`Snapshot.windows(of:)`](/en/swift/latest/reference/snapshot-windows(of-)/) (method) |
| OCaml | [`Libtmux.Session.windows`](/en/ocaml/latest/reference/libtmux-session-windows/) (function). Reads distinct captured global windows in this session. window_links preserves individual indexed placements. |
| Perl | Traverse Session::window_links and resolve each link’s window, preserving explicit session placement and multiplicity. |

No equivalent is recorded in Lua or Elixir.

List the server's windows

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.windows`](/en/py/latest/reference/libtmux-server-windows/) (property) |
| Ruby | [`LibTmux::Server#list_windows`](/en/ruby/latest/reference/libtmux-server-list_windows/) (method) |
| Lua | [`libtmux.Snapshot.windows`](/en/lua/latest/reference/libtmux-snapshot-windows/) (attribute) |
| PowerShell | [`LibTmux\Get-TmuxWindow`](/en/powershell/latest/reference/libtmux-get-tmuxwindow/) (cmdlet). Use the [`-Server`](/en/powershell/latest/reference/libtmux-get-tmuxwindow/#LibTmux%5CGet-TmuxWindow.parameter.Server) parameter set to acquire window placements across all sessions. |
| Julia | [`LibTmux.windows`](/en/julia/latest/reference/libtmux-windows/) (function). `windows` with a `Snapshot` reads every captured physical window. Use `windowlinks` for session placements. |
| Erlang | [`tmux_snapshot:windows/1`](/en/erlang/latest/reference/tmux_snapshot-windows-1/) (function). Returns unique captured physical windows. `window_links/1` lists session memberships. |
| Elixir | [`LibTmux.Snapshot.windows/1`](/en/elixir/latest/reference/libtmux-snapshot-windows-1/) (function). Returns a `Selection` of every captured physical window. `window_links/1` lists session placements. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`server.Server.windows`](/en/ts/latest/reference/server-server-windows/) (method) |
| Rust | [`server.Server.windows`](/en/rs/latest/reference/server-server-windows/) (method) |
| Go | [`tmux.Server.Windows`](/en/go/latest/reference/tmux-server-windows/) (method) |
| Java | [`io.github.libtmux.Server.windows`](/en/java/latest/reference/io-github-libtmux-server-server-windows/) (method) |
| Clojure | [`libtmux.core/windows!`](/en/clojure/latest/reference/libtmux-core-windows/) (function). Acquires a new graph and returns its window placements without deduplicating linked windows. |
| Kotlin | [`io.github.libtmux.kotlin.Server.windows`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-server-windows/) (method) |
| Scala | [`io.github.libtmux.scaladsl.Server.windows`](/en/scala/latest/reference/io-github-libtmux-scaladsl-server-windows/) (method) |
| C# | [`LibTmux.Server.Windows`](/en/csharp/latest/reference/libtmux-server-windows/) (property) |
| F# | [`LibTmux.FSharp.Server.windows`](/en/fsharp/latest/reference/libtmux-fsharp-server-windows/) (function). Builds a deferred query for placements across all sessions. `Query.list` acquires the results; a linked window appears once for each session placement. |
| C++ | [`libtmux::Server::windows`](/en/cxx/latest/reference/libtmux-server-windows/) (method) |
| Swift | [`Server.windows()`](/en/swift/latest/reference/server-windows()/) (method) |
| OCaml | [`Libtmux.Snapshot.windows`](/en/ocaml/latest/reference/libtmux-snapshot-windows/) (function). Reads captured global windows; use window_links for indexed session placements. |
| Perl | [`LibTmux::Snapshot::windows`](/en/perl/latest/reference/libtmux-snapshot-windows/) (method). One entry per physical identity. window_links retains all session placements. |
