Core Library0.xAPI reference

Choose documentation 1

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

module libtmux-fsharp

Session

Starts queries confined to one session.

Source and package
Qualified name
LibTmux.FSharp.Session
Namespace
LibTmux.FSharp
Package
LibTmux.FSharp
Source
src/LibTmux.FSharp/Hierarchy.fsi

Description

Each function takes the session it acts on last. One that runs a tmux command also takes the cancellation token first and returns a Task. The session is the core LibTmux.Session handle, which is immutable and safe to share.

What is on here

A tmux session has a good many members, but this module covers the part an F# caller reaches first. The rest lives on the core handle. The members fall into a few groups:

Looking inside
Start a query over the session's windows or panes; either throws IncompleteSnapshotException when the session was not read through a server. Or ask tmux now for the pane the session shows, its current window's active pane, which throws TmuxObjectNotFoundException when tmux reports none.
Changing the session
Renaming returns a handle carrying the new name, and tmux expands the name as a format, so a # in it does not survive verbatim. Killing the session takes its windows and panes with it, and leaves off the core's other kill options. Creating a window returns it as the request describes, and cancellation can leave the window created.
Waiting
Each wait on the session's panes attaches a control client and lets it go when the wait ends. Holding one across a series of waits saves that attach for each, until the handle is disposed; use it with use!.

The rest of a session is on the core LibTmux.Session, which F# calls like any .NET type: selecting and stopping windows, locking, attaching and detaching clients, and the session's options, hooks, and environment. Options reads and writes an option through the options of that scope.

Members7 members

Collections and queries2

  • windows Queries the window placements in a session.
  • panes Queries the panes of every window in a session.

Common operations3

  • activePane Reads from tmux the pane the session shows: its current window's active pane.
  • holdWaitClient Keeps the control client that waits on the session's panes use attached until the handle is disposed.
  • newWindow Creates a window in the session as the request describes, and returns it.

Other members2

  • kill Kills the session, with its windows and panes.
  • rename Renames the session and returns a handle carrying the new name.

Guides

task material

Pages that discuss Session.

In other ports

task equivalence 22 other ports mapped

Source-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.

A tmux session in each port
PortAPIDiffers from F#
F# LibTmux.FSharp.Session
Starts queries confined to one session.
This page
Python libtmux.Session
tmux(1) Session [session_manual].
None recorded in the model
Ruby LibTmux::Session None recorded in the model
Lua libtmux.Session None recorded in the model
PowerShell LibTmux\Get-TmuxSession
Read sessions with optional exact selectors.
This cmdlet reads and returns shared .NET LibTmux.Session objects. Child windows and panes require further acquisition.
Julia LibTmux.SessionSnapshot 2 overloads
SessionSnapshot holds captured session data. Actions use its SessionRef, a typed identity bound to an observed daemon generation.
Erlang #tmux_model:session{} None recorded in the model
Elixir LibTmux.Session
An immutable session observation. Attachment retains tmux's client count.
Session is an immutable observation. Fields not captured read as :unloaded.
Haskell LibTmux.Snapshot.Session
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:session
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.Session
One session on one tmux server, as a handle rather than a copy of it.
None recorded in the model
Rust session.Session
One tmux session, together with the snapshot it was discovered with.
None recorded in the model
Go tmux.Session
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.github.libtmux.Session
One tmux session, as one capture saw it.
readonly
Clojure libtmux.core/sessions!
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.github.libtmux.kotlin.Session
A tmux session and its captured windows and properties.
None recorded in the model
Scala io.github.libtmux.scaladsl.Session
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# LibTmux.Session
Represents an immutable session handle and snapshot.
None recorded in the model
C++ libtmux::Session
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.Session.t None recorded in the model
Perl LibTmux::Session
Captured session entity
A captured read-only entity; explicit Server operations accept its stable identity.
Raku LibTmux::Model::Session
Captured session with local window-link and group relationships.
None recorded in the model
Esc
Search in

Type to search.

Reference previewOpen reference