Core LibraryalphaAPI Reference

Choose documentation 1

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function libtmux-elixir latest

Window.panes/2

Returns a plain list of captured physical panes in numeric pane-ID order.

Source and package
Qualified name
LibTmux.Window.panes/2
Module
LibTmux
Declared in
Window
Package
libtmux
Source
lib/libtmux/entities.ex

Description#

Uses the supplied snapshot and validates the window's ID and incarnation. Identity, coverage, empty-list and no-I/O behavior follow LibTmux.Session.windows/2 .

Examples#

iex> alias LibTmux.{Snapshot, Window}
iex> rows = %{window: [%{id: "@0"}], pane: [
...> %{id: "%10", window_id: "@0"}, %{id: "%2", window_id: "@0"}]}
iex> {:ok, snapshot} = Snapshot.new(rows,
...> server_instance: "example", captured_from: 0, captured_until: 0,
...> complete: [:pane], fields: %{pane: [:window_id]})
iex> {:ok, window} = Snapshot.fetch(snapshot, :window, "@0")
iex> Window.panes(snapshot, window) |> Enum.map(& &1.id)
["%2", "%10"]
Parameters

Discussed in Captured tmux state

Esc

Type to search.

Reference preview Open reference