Resize (pixels)
Resize (pixels) is an XTerm window manipulation sequence that resizes the terminal window's text area to the specified pixel dimensions.
Syntax
CSI 4 ; height ; width t Resize text area to pixel dimensions
resize_pixels = 0x1b, "[", "4", ";", Pn, ";", Pn, "t" ;
Pn = digit, { digit } ;
digit = "0" | "1" | "2" | "3" | "4"
| "5" | "6" | "7" | "8" | "9" ;Parameters
| Parameter | Description | Default |
|---|---|---|
height | Height of the text area in pixels | (unchanged) |
width | Width of the text area in pixels | (unchanged) |
Description
This sequence resizes the terminal window so that the text area (the region where characters are rendered, excluding window decorations such as title bars, scroll bars, and borders) occupies the specified pixel dimensions. It is part of the XTerm CSI Ps ; Ps ; Ps t window manipulation family.
The total window size will be larger than the specified dimensions due to window decorations and padding. If a parameter is omitted or zero, that dimension should remain unchanged, though behavior varies between implementations.
The resulting character grid size depends on the current cell dimensions. For example, resizing to 800x600 pixels with a cell size of 8x16 pixels would yield a 100-column by 37-row grid (with some remainder pixels as padding).
The Text Area Size (pixels) report (CSI 14 t) can be used to query the current text area size in pixels after resizing.
Some terminal emulators disable this sequence by default for security reasons. Check your terminal's configuration for options to enable or disable window manipulation sequences.
Examples
# Resize text area to 800x600 pixels
printf '\e[4;600;800t'
# Resize text area to 1024x768 pixels
printf '\e[4;768;1024t'
Specifications
| Specification | Section |
|---|---|
| XTerm ctlseqs | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✗ | No | Rejected per escape_support.md:81-82 |
| Bobcat | ✓ | 0.9.0 | Handled via WhenWindowGeometryChange callback; requires WindowActions enabled in profile |
| contour | ✓ | v0.1.0 | CSI 4;h;w t implemented in WINDOWMANIP (case 4) |
| foot | ✗ | No | CSI 4 t logs unimplemented warning |
| Ghostty | ✗ | No | CSI 4;h;w t not implemented |
| iTerm2 | ✓ | v20260216-nightly | CSI 4;h;w t via XTERMCC_WINDOWSIZE_PIXEL |
| Kitty | ✗ | No | CSI 4 t explicitly rejected |
| Konsole | ✗ | No | CSI 4 t not implemented |
| mintty | ✓ | Yes | CSI 4;h;w t implemented |
| mlterm | ✓ | rel-3_8_0 | CSI 4 t supported |
| PuTTY | ✗ | No | CSI 4 t recognized but not implemented (terminal.c:4877-4882: 'resizing code isn't healthy enough') |
| Rio | ✗ | No | |
| rxvt-unicode | ✓ | 1.2 | |
| st | ✗ | No | No CSI t window manipulation sequences implemented |
| terminology | ✗ | No | |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | Converts pixels to cells and emits resize-window signal |
| WezTerm | ✗ | No | Parsed but not allowed for security |
| Windows Terminal | ✗ | No | CSI 4;h;w t not in WindowManipulationType enum |
| xterm | ✓ | xterm-93 | |
| xterm.js | ✓ | 4.4.0 | CSI 4;h;w t. Requires windowOptions.setWinSizePixels enabled. |
| Multiplexers | |||
| cy | ✗ | No | Explicitly ignored |
| GNU Screen | ✗ | No | CSI 4;h;w t not implemented |
| tmux | ✗ | No | Sequence parsed but ignored (case 4 in winops) |
| tuios | ✗ | No | CSI 4 t not handled |
| Zellij | ✗ | No | |
See also
- Resize (chars) — Resize window in character dimensions
- Text Area Size (pixels) — Query current text area pixel dimensions
- Cell Size — Query individual cell pixel dimensions
- Move Window — Move window to a pixel position