Session.windows/2
Returns a selection of captured physical windows in first-link order.
Source and package
- Qualified name
-
LibTmux .Session. windows/2 - Module
- LibTmux
- Declared in
Session- Package
- libtmux
- Source
- lib/libtmux/entities.ex
- windows(snapshot, session) @spec windows(Lib
Tmux (), t()) :: Lib.Snapshot .t Tmux (Lib.Selection .t Tmux ()).Window .t -
Description
Repeated links to a window contribute it once. For membership indexes use
LibTmux.Snapshot.related/4with:window_links.The supplied snapshot owns all returned fields and relationships. Only the session's ID and incarnation are used; its other fields may be older. Invalid or stale identities and missing source/relationship coverage raise
LibTmux.Error. A covered empty relation returns an empty selection. No I/O occurs. The selection retains the supplied snapshot for filtering; relationship predicates still validate their whole captured source domain. UseEnum.to_list/1when only the list is needed.- Parameters
-
Examples
iex> alias LibTmux.{Selection, Session, Snapshot}iex> rows = %{session: [%{id: "$0"}], window: [%{id: "@7"}],...> window_link: [%{session_id: "$0", window_id: "@7", index: 0, active: true},...> %{session_id: "$0", window_id: "@7", index: 3, active: false}],...> pane: [%{id: "%9", window_id: "@7"}]}iex> {:ok, snapshot} = Snapshot.new(rows,...> server_instance: "example", captured_from: 0, captured_until: 0,...> complete: [:window_link, :pane],...> fields: %{window_link: [:session_id, :window_id, :active], pane: [:window_id]})iex> {:ok, session} = Snapshot.fetch(snapshot, :session, "$0")iex> {:ok, window} = Session.windows(snapshot, session) |> Selection.one()iex> window.id"@7"iex> Session.panes(snapshot, session) |> Enum.map(& &1.id)["%9"]iex> Session.active_window(snapshot, session) == windowtrue
Recorded calls
source callsThe Elixir reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Session.windows/2.
Guides
task materialPages that discuss windows/2.