LibTmux.Set-TmuxWindowSize
LibTmux\Set-TmuxWindowSize Resize a window in cells or against its attached clients.
Source and package
- Declared in
- LibTmux
- Package
- LibTmux
- Source
- src/LibTmux.PowerShell/SetTmuxWindowSizeCommand.cs
- Direction: Set-TmuxWindowSize [-Window] <Lib
Tmux > -Direction <Lib.Window Tmux > -Adjustment <System.Resize Direction .Int32 > [-PassThru ] [-WhatIf ] [-Confirm] [<CommonParameters >] Mode: Set-TmuxWindowSize [-Window] <LibTmux > -Mode <Lib.Window Tmux > [-Pass.Window Resize Mode Thru ] [-WhatIf ] [-Confirm] [<CommonParameters >] Size (default): Set-TmuxWindowSize [-Window] <LibTmux > [-Width <System.Window .Nullable [System.Int32 ]>] [-Height <System.Nullable [System.Int32 ]>] [-PassThru ] [-WhatIf ] [-Confirm] [<CommonParameters >] -
Description#
Specify at least one positive cell dimension, an edge Direction with positive Adjustment, or a client-size Mode. These forms cannot be combined. Resize delegates to the native core and switches window-size to manual. PassThru returns the observed replacement
Window; the original capture remains unchanged.Notes
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
- Size
- Confirmation
- Supports
-WhatIfand-Confirm; confirm impact: Medium. - Positional binding
- Enabled.
- Pipeline inputs
-
LibTmux.Window: Native pipeline owner. - Outputs
-
LibTmux.Window
Examples#
Example 1 Set a previously selected native
$windowto 120 columns and 40 rows. View sourceTerminal window $window | LibTmux\Set-TmuxWindowSize -Width 120 -Height 40 -PassThru- Parameters
-
-
The native window to change.
- Required
- Yes
- Position
- 0
- Pipeline input
- By value
- Validation
ValidateNotNull()
-
-Direction(LibTmux ) (for.Resize Direction Direction) #Move the Up, Down, Left or Right edge.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateSet(["Up","Down","Left","Right"])
-
-Adjustment(System.Int32 ) (forDirection) #Positive number of cells to move the selected edge.
- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateRange(1, 2147483647)
-
-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.Window Resize Mode Mode) #Expandto the largest client orShrinkto the smallest client.- Required
- Yes
- Position
- Named
- Pipeline input
- No
- Validation
ValidateSet(["Expand","Shrink"])
-
-Width(System.Nullable [System.Int32 ]) (forSize) #Positive width in cells. At least one of Width or Height is required in the Size parameter set.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateRange(1, 2147483647)
-
-Height(System.Nullable [System.Int32 ]) (forSize) #Positive height in cells.
- Required
- No
- Position
- Named
- Pipeline input
- No
- Validation
ValidateRange(1, 2147483647)
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.