Core Library0.xAPI reference

Choose documentation 2

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

PowerShell API

cmdlet libtmux-powershell

LibTmux.Set-TmuxLayout

Arrange the panes of a window.

Source and package
Qualified name
LibTmux\Set-TmuxLayout
Declared in
LibTmux
Package
LibTmux
Source
src/LibTmux.PowerShell/SetTmuxLayoutCommand.cs

Description

Apply a named preset or a captured window Layout string. Mode accepts Spread, Next or Previous. The native core rejects unknown or ambiguous preset names before dispatch. Without PassThru, emit no success output; with it, return a replacement Window and leave the original capture unchanged.

Notes

Restoring a classic layout restores pane sizes but can rotate pane placement on tmux 3.7 and earlier. It does not guarantee the same pane IDs occupy the same positions. A mirrored main layout needs tmux 3.5 and a JSON layout needs tmux 3.8; on an earlier daemon the cmdlet reports LibTmux.TmuxUnsupportedOnReleaseException as its error before applying the layout. A layout that is malformed or unknown reports LibTmux.TmuxWindowException on every release. A disappeared target or stale generation writes a per-target error. Use -ErrorAction Stop to terminate. Cancellation cannot undo an already dispatched change.

Command details

Command type
cmdlet
Default parameter set
Layout
Confirmation
Supports -WhatIf and -Confirm; confirm impact: Medium.
Positional binding
Enabled.
Pipeline inputs
LibTmux.Window: Native pipeline owner.
Outputs
LibTmux.Window
Parameters
Common parameters 12

PowerShell supplies these parameters. See common parameter behavior for their effects.

Returns

LibTmux.Window: Emitted only with PassThru.

Examples

Example 1 Tile the panes in a previously selected native $window. View source

Terminal window
$window | LibTmux\Set-TmuxLayout -Layout tiled -PassThru

Recorded calls

source calls
No call edges in the PowerShell model.

The PowerShell 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\Set-TmuxLayout.

tmux command

task material

The tmux commands behind Set-TmuxLayout.

tmux C API

task material

The C declarations in tmux that implement these commands.

Guides

task material

Pages that discuss Set-TmuxLayout.

Esc
Search in

Type to search.

Reference previewOpen reference