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

Window

Identifies window placements and starts queries confined to one window.

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

Description

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

What is on here

A tmux window 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 window's panes, which throws IncompleteSnapshotException when the window was not read through a server. Or ask tmux now for the window's active pane, which throws TmuxObjectNotFoundException when tmux reports none. A linked window is one placement per session, and the placement key names the session and index a handle was captured at.
Arranging
A layout is applied by name, and a name tmux may not recognise is refused with TmuxWindowException before anything is sent. Resizing and moving take the core request.
Changing the window
Renaming returns a handle carrying the new name, and tmux expands the name as a format, so a # in it does not survive verbatim. Selecting makes the window its session's current one. Killing the window takes its panes with it, and leaves off the core's other kill options.

The rest of a window is on the core LibTmux.Window, which F# calls like any .NET type: creating panes, linking and unlinking, rotating, its options and hooks, and the raw command through ExecuteCommandAsync.

Members9 members

Collections and queries1

  • panes Queries the panes in a window.

Common operations6

  • activePane Reads from tmux the window's active pane.
  • move Moves the window as the request says, and returns a handle carrying the state afterwards.
  • rename Renames the window and returns a handle carrying the new name.
  • resize Resizes the window as the request says, and returns a handle carrying the state afterwards.
  • select Makes the window its session's current window, and returns a handle carrying the state afterwards.
  • selectLayout Arranges the window's panes in a layout, such as even-horizontal or tiled, and returns a handle carrying the state afterwards.

Other members2

  • kill Kills the window, with its panes.
  • placementKey Returns a comparable key including the captured session and window index.

Guides

task material

Pages that discuss Window.

In other ports

task equivalence 22 other ports mapped

Source-verified mappings for A tmux window. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.

A tmux window in each port
PortAPIDiffers from F#
F# LibTmux.FSharp.Window
Identifies window placements and starts queries confined to one window.
This page
Python libtmux.Window
tmux(1) Window [window_manual].
None recorded in the model
Ruby LibTmux::Window None recorded in the model
Lua libtmux.Window None recorded in the model
PowerShell LibTmux\Get-TmuxWindow
Read contextual windows from a server or session.
2 overloads
This cmdlet reads shared .NET LibTmux.Window placements. Use -Server for all sessions or -Session for one session.
Julia LibTmux.WindowSnapshot 2 overloads
WindowSnapshot holds captured physical-window data. WindowLink records a placement in a session; actions use WindowRef.
Erlang #tmux_model:window{}
A physical window can have several session memberships. window_link holds the session-relative index and active flag.
Elixir LibTmux.Window
An immutable physical window, independent of session membership and index.
Window is a physical window. WindowLink records its session index and active state.
Haskell LibTmux.Snapshot.Window
Detached physical window, independent of its session and index appearances.
Window is a detached physical window, independent of its session placements. WindowLink records each session, index and window binding, and operations take a generation-bound WindowRef.
Common Lisp libtmux:window
A physical window shared by zero or more captured links.
window is a physical captured window. window-link preserves each session placement.
TypeScript window.Window
One window on one tmux server, as a handle rather than a copy of it.
None recorded in the model
Rust window.Window
One tmux window, as reached through one session that links it.
None recorded in the model
Go tmux.Window
Window is one materialized (session, index, window) winlink record. It is normally returned by Server.Snapshot, Server.Window, or Window.Refresh. A zero Window is not a usable tmux target.
None recorded in the model
Java io.github.libtmux.Window
One tmux window at one of its positions, as one capture saw it.
readonly
Clojure libtmux.data/windows
Returns the captured window occurrences in a snapshot or session.
Traverses captured window-placement maps without I/O; the window value is a map with an explicit Java reference for effects.
Kotlin io.github.libtmux.kotlin.Window
A tmux window at a specific position in a session.
None recorded in the model
Scala io.github.libtmux.scaladsl.Window
One captured window placement, opaque over the Java handle. Equality includes its session and index, since a window linked into more than one session has more than one placement. 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.Window
Represents an immutable window handle and snapshot.
None recorded in the model
C++ libtmux::Window
One window, as one listing saw it.
None recorded in the model
Swift Window
One tmux window, independent of every session that links it.
None recorded in the model
OCaml Libtmux.Window.t
A global window can have several session placements. Window_link holds the session, index and current flag.
Perl LibTmux::Window
Captured window entity
Physical window identity. WindowLink owns each session/index placement.
Raku LibTmux::Model::Window
Captured physical window; session-relative indices belong to WindowLink.
A physical window may have multiple WindowLink placements, including distinct indexes in one session.
Esc
Search in

Type to search.

Reference previewOpen reference