# LibTmux.Snapshot.windows/1

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/snapshot.ex#L178
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-snapshot-windows-1/

```
windows(snapshot)
@spec windows(t()) ::
        LibTmux.Selection.t(LibTmux.Window.t())
```

Returns a materialized physical window selection without I/O.

See the [worked example](api-examples.html#local-graph-and-filtering).

## Parameters

- `snapshot` (`t()`)

## In other ports

List the server's windows

| Port | API | Differs from Elixir |
| --- | --- | --- |
| Elixir | `LibTmux.Snapshot.windows/1`. Returns a materialized physical window selection without I/O. | This page |
| Python | [`libtmux.Server.windows`](/en/py/latest/reference/libtmux-server-windows/) (property). Windows contained in server's sessions. | None recorded in the model |
| Ruby | [`LibTmux::Server#list_windows`](/en/ruby/latest/reference/libtmux-server-list_windows/) (method). Behavior: Live acquisition. | on Server |
| Lua | [`libtmux.Snapshot.windows`](/en/lua/latest/reference/libtmux-snapshot-windows/) (attribute) | None recorded in the model |
| PowerShell | [`LibTmux\Get-TmuxWindow`](/en/powershell/latest/reference/libtmux-get-tmuxwindow/) (cmdlet). Read contextual windows from a server or session. | free function. 2 overloads. 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) | free function. 2 overloads. `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). Return unique captured physical windows in numeric ID order. Performs no I/O. Use window_links/1 for session-relative membership and indexes. | free function. Returns unique captured physical windows. `window_links/1` lists session memberships. |
| Common Lisp | [`libtmux:windows`](/en/lisp/latest/reference/libtmux-windows/) (function). 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. | free function. 3 overloads. `windows` on a snapshot returns captured physical windows once each. |
| TypeScript | [`server.Server.windows`](/en/ts/latest/reference/server-server-windows/) (method). Every window on the server, including each placement of a linked window. | async. on Server |
| Rust | [`server.Server.windows`](/en/rs/latest/reference/server-server-windows/) (method). List every window on the server, preserving any failure. | async. on Server |
| Go | [`tmux.Server.Windows`](/en/go/latest/reference/tmux-server-windows/) (method). Windows materializes one record per winlink. Failures, including ErrNoServer, remain errors rather than empty results. | on Server |
| Java | [`io.github.libtmux.Server.windows`](/en/java/latest/reference/io-github-libtmux-server-server-windows/) (method). Captures every winlink, preserving each session and index placement. | on Server. 3 overloads |
| Clojure | [`libtmux.core/windows!`](/en/clojure/latest/reference/libtmux-core-windows/) (function). Acquires captured window occurrences. | free 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). Captures every winlink, preserving each session and index placement. | async. on Server. 3 overloads |
| Scala | [`io.github.libtmux.scaladsl.Server.windows`](/en/scala/latest/reference/io-github-libtmux-scaladsl-server-windows/) (method). Captures every winlink, preserving each session and index placement. | on Server. 3 overloads |
| C# | [`LibTmux.Server.Windows`](/en/csharp/latest/reference/libtmux-server-windows/) (property). Gets the windows this handle captured, across every session. | None recorded in the model |
| F# | [`LibTmux.FSharp.Server.windows`](/en/fsharp/latest/reference/libtmux-fsharp-server-windows/) (function). Queries window placements across all sessions. | free 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). tmux scopes window and pane listings to the current session unless asked for every one, so -a is part of the request rather than a caller's responsibility to remember. | on Server. readonly |
| Swift | [`Server.windows()`](/en/swift/latest/reference/server-windows()/) (method). Every window on this server, in tmux's own order. | async. on Server |
| OCaml | [`Libtmux.Snapshot.windows`](/en/ocaml/latest/reference/libtmux-snapshot-windows/) (function) | free function. Reads captured global windows; use window_links for indexed session placements. |
| Perl | [`LibTmux::Snapshot::windows`](/en/perl/latest/reference/libtmux-snapshot-windows/) (method). Return a fresh LibTmux::WindowSelection containing each physical window identity once. Context lives in "window_links". | One entry per physical identity. window_links retains all session placements. |
| Raku | [`LibTmux::Model::Snapshot.windows`](/en/raku/latest/reference/libtmux-model-snapshot-windows/) (method). Captured physical windows, unique by daemon-scoped identity. | Physical windows occur once; window-links preserves placements. |

No Haskell equivalent. No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
