Session
An immutable session observation with explicit actions. Attachment retains tmux's client count.
Source and package
- Qualified name
-
LibTmux. Session - Module
- LibTmux
- Package
- libtmux
- Source
- lib/libtmux/entities.ex
-
Description
What is on here
A Session is a value captured in a
LibTmux.Snapshot. Relationship functions read the snapshot you pass; actions take aLibTmux.Refand a Server or Control connection. Start with these groups:- Finding the session
- Select sessions from a captured snapshot, or look one up by its exact ID. Neither contacts tmux. An ID that was not captured returns
{:error, error}with kind:not_found. Turn the session into a reference tied to the server incarnation that supplied it, ready for an action. - SelectBy IDReference
- Looking inside a session
- Read windows, panes and the active window from the snapshot, without I/O. A window linked more than once appears once, and a covered empty relation returns an empty selection. An invalid or stale identity, or a relationship the snapshot did not capture, raises
LibTmux.Error. For per-session window indexes useLibTmux.Snapshot.related/4with:window_links. - WindowsPanesFocused
- Creating a window
- Create a named detached window in the session through one-shot execution. The completed value holds the new ID with
ref: nil; capture a fresh observation to obtain a reference. A Control connection is unsupported, and a missing server is not started. - CreateRaise on failure
- Renaming
- Rename the session through a Server or a Control connection. A name holds 1..1024 UTF-8 bytes with no control characters, and tmux still normalizes it. Observations you already hold keep the old name.
- RenameRaise on failure
Members15 members
Collections and queries2
Common operations5
- id: String
.t () property Required: building the struct without this key is an error. - name: Lib
Tmux (String.Schema .observed .t ()) property - attached: Lib
Tmux (boolean()) property.Schema .observed - active_window/2 function Returns the captured active physical window, or
nilwhen none is active. - attached_count: Lib
Tmux (non.Schema .observed _neg ()) property_integer
Other members8
- kill!/3 function Returns
:okwhenkill/3completes; raises API errors orLibTmux.Action.CompletionErrorotherwise. - kill/3 function Kills an exact session through one-shot execution.
- new_window!/4 function Returns the created window value when
new_window/4completes; raises the original error otherwise. - new_window/4 function Creates a named detached window in an exact session through one-shot execution.
- rename!/4 function Returns
:okwhenrename/4completes; raises API errors orLibTmux.Action.CompletionErrorotherwise. - rename/4 function Renames an exact session; returns
{:ok, result}on command completion. - server_instance: String
.t () property Required: building the struct without this key is an error. - t/0: t() :: %Lib
Tmux { attached: Lib.Session Tmux (boolean()), attached_count: Lib.Schema .observed Tmux (non.Schema .observed _neg ()), id: String_integer .t (), name: LibTmux (String.Schema .observed .t ()), server_instance: String.t () } typealias A session with explicit field coverage and an attachment count separate from its Boolean projection.
No members of Session match . The filter searches only this type. Search the whole API.
Order: the accessors that walk the hierarchy, the operations the ports share, then the rest.
In other ports
task equivalence 22 other ports mappedSource-verified mappings for A tmux session. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from Elixir |
|---|---|---|
| Elixir | Lib An immutable session observation with explicit actions. Attachment retains tmux's client count. | This page |
| Python | libtmux tmux(1) Session [session_manual]. | None recorded in the model |
| Ruby | Lib A session on one server, reached through a handle that wraps an EntityRef.
A handle never caches state: each method runs one tmux command, and
Entity#snapshot reads the session back as a record. Methods take timeout:
and cancel:, and raise CommandError when tmux rejects the command. A
listing that fails raises, so an empty array means tmux answered with nothing
to list. | None recorded in the model |
| Lua | libtmux | None recorded in the model |
| PowerShell | Lib Read sessions with optional exact selectors. | This cmdlet reads and returns shared .NET LibTmux.Session objects. Child windows and panes require further acquisition. |
| Julia | Lib | 2 overloads SessionSnapshot holds captured session data. Actions use its SessionRef, a typed identity bound to an observed daemon generation. |
| Erlang | #tmux | None recorded in the model |
| Haskell | Lib Detached physical session. Navigate its appearances through WindowLink. | Session is a detached physical session. WindowLink records each placement of a window in it, and operations take a generation-bound SessionRef. |
| Common Lisp | libtmux: A captured physical tmux session. | session is an immutable captured entity. The same name also has a relation accessor with a distinct public identity. |
| TypeScript | session One session on one tmux server, as a handle rather than a copy of it. | None recorded in the model |
| Rust | session One tmux session, together with the snapshot it was discovered with. | None recorded in the model |
| Go | tmux Session is one materialized tmux session record. It is normally returned by Server.Snapshot, Server.Session, or Session.Refresh. A zero Session is not a usable tmux target. | None recorded in the model |
| Java | io One tmux session, as one capture saw it. | readonly |
| Clojure | libtmux Acquires captured sessions; acquisition failure throws. | Acquires a vector of captured session maps. The session value is a map, not a wrapper class. |
| Kotlin | io A tmux session and its captured windows and properties. | None recorded in the model |
| Scala | io A captured session, opaque over the Java handle; every operation beyond equality is an extension, generated from the operation catalog or handwritten where the catalog marks it WAIT, STREAM or LIFECYCLE. | 2 overloads |
| C# | Lib Represents an immutable session handle and snapshot. | None recorded in the model |
| F# | Lib Starts queries confined to one session. | This F# module builds deferred child queries from a shared .NET LibTmux.Session and its server association. Query.list acquires their results from tmux. |
| C++ | libtmux:: One session, as one listing saw it. | None recorded in the model |
| Swift | Session A tmux session, as it was when the listing was read. | None recorded in the model |
| OCaml | Libtmux | None recorded in the model |
| Perl | Lib Captured session entity | A captured read-only entity; explicit Server operations accept its stable identity. |
| Raku | Lib Captured session with local window-link and group relationships. | None recorded in the model |