Server.snapshot
Acquire an immutable view of the server at this instant.
Source and package
- snapshot( options: Snapshot
Options = {}, ): Promise<ServerSnapshot > -
Description#
Acquisition is the only step that talks to tmux. Everything reachable from the returned value resolves locally, so traversal and filtering issue no commands and an earlier snapshot keeps reporting its own instant.
daemonIdentity()identifies the daemon captured with these collections.Examples#
const now = await server.snapshot();now.daemonIdentity.pid;now.windows.count();- Parameters
-
-
options={}(SnapshotOptions ) #
-
tmux command#
The tmux commands behind snapshot.
list-panes -a server scope, cmd_list_panes_server tmux C API#
The C declarations in tmux that implement these commands.
Guides#
Pages that discuss snapshot.
- Concepts
- Guides
In other ports#
Capture the tmux hierarchy
| Language | Equivalent |
|---|---|
| Python | no equivalent on Server |
| Ruby | Lib |
| Lua | libtmux |
| PowerShell | Lib Acquires a replacement LibTmux.Server to -Depth (panes by default). Acquisition is not atomic; retained handles do not refresh. |
| Julia | Lib Acquires a new Snapshot over an observation interval. Topology checks do not make it a transaction; earlier snapshots do not refresh. |
| Elixir | Lib Captures a new graph over an observation interval. A retained Snapshot never refreshes. |
| Rust | server Fetches the whole hierarchy with list-sessions, list-windows -a and list-panes -a, and stitches the rows by winlink. The three listings are separate commands, so the capture is not an atomic transaction. |
| Go | tmux |
| Java | io |
| Kotlin | io |
| Scala | io |
| C# | Lib |
| F# | Lib Acquires a replacement shared .NET LibTmux.Server to the requested depth. Acquisition is not atomic; retained handles do not refresh. |
| C++ | no equivalent on Server: sessions, windows, panes and clients each take a snapshot of one listing, and Snapshot::take needs the internal detail::Backend, so no public call reads the whole hierarchy at once |
| Swift | Server |