LibTmux.Set-TmuxLayout
LibTmux\Set-TmuxLayout Arrange the panes of a window.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/SetTmuxLayoutCommand.cs
- Layout (default): Set-TmuxLayout [-Window] <Lib
Tmux > -Layout <System.Window .String > [-PassThru ] [-WhatIf ] [-Confirm] [<CommonParameters >] Mode: Set-TmuxLayout [-Window] <LibTmux > -Mode <Lib.Window Tmux > [-Pass.Select Layout Mode Thru ] [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Apply a named preset or a captured window Layout string. Mode accepts
Spread,NextorPrevious. The native core rejects unknown or ambiguous preset names before dispatch. Without PassThru, emit no success output; with it, return a replacementWindowand 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 disappeared target or stale generation writes a per-target error. Use
-ErrorActionStop to terminate. Cancellation cannot undo an already dispatched change.Command details#
- Command type
cmdlet- Default parameter set
- Layout
- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: Medium. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Window: Native pipeline owner. - Outputs
-
LibTmux.Window
Examples#
Example 1 Tile the panes in a previously selected native
$window. View sourceTerminal window $window | LibTmux\Set-TmuxLayout -Layout tiled -PassThru- Parameters
-
-
The native window to change.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Layout(System.String ) (forLayout) #A preset name, unambiguous preset prefix, or captured layout string.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateNotNullOrEmpty()- Validation
ValidatePattern("\\A[^\\x00]*[^\\s\\x00][^\\x00]*\\z")
-
-PassThru(System.Management ) #.Automation .Switch Parameter Emit the native replacement handle carrying observed state.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
-
-WhatIf(System.Management ) #.Automation .Switch Parameter Preview the change without contacting tmux.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
wi
-
-Confirm(System.Management ) #.Automation .Switch Parameter Ask for confirmation before changing tmux.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Switch
- Yes
- Aliases
cf
-
-Mode(LibTmux ) (for.Select Layout Mode Mode) #Spreadpanes or select theNextorPreviouslayout.- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateSet(["Spread","Next","Previous"])
Common parameters 12
PowerShell supplies these parameters. See common parameter behavior for their effects.
-
-Verbose(System.Management ) #.Automation .Switch Parameter Display verbose messages produced by this command.
Aliases:vbMicrosoft Learn reference -
-Debug(System.Management ) #.Automation .Switch Parameter Display debug messages produced by this command.
Aliases:dbMicrosoft Learn reference -
-ErrorAction(System.Management ) #.Automation .Action Preference Choose how this command responds to non-terminating errors.
Aliases:eaMicrosoft Learn reference -
-WarningAction(System.Management ) #.Automation .Action Preference Choose how this command responds to warning messages.
Aliases:waMicrosoft Learn reference -
-InformationAction(System.Management ) #.Automation .Action Preference Choose how this command handles information messages.
Aliases:infaMicrosoft Learn reference -
-ProgressAction(System.Management ) #.Automation .Action Preference Choose how this command handles progress updates.
Aliases:progaMicrosoft Learn reference -
-ErrorVariable(System.String ) #Store the command's error records in the named variable.
Aliases:evMicrosoft Learn reference -
-WarningVariable(System.String ) #Store the command's warning records in the named variable.
Aliases:wvMicrosoft Learn reference -
-InformationVariable(System.String ) #Store the command's information records in the named variable.
Aliases:ivMicrosoft Learn reference -
-OutVariable(System.String ) #Save output in the named variable while passing it down the pipeline.
Aliases:ovMicrosoft Learn reference -
Buffer output before passing it to the next pipeline command.
Aliases:obMicrosoft Learn reference -
-PipelineVariable(System.String ) #Make the most recent output object available through a named variable within the pipeline.
Aliases:pvMicrosoft Learn reference
-
- Returns
-
LibTmux.Window: Emitted only with PassThru.