Skip to main content

Resize (chars)

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Experimental

Resize (chars) is an XTerm window manipulation sequence that resizes the terminal window's text area to the specified number of rows and columns.

Syntax​

CSI 8 ; rows ; cols t     Resize text area to character dimensions
Formal syntax
resize_chars = 0x1b, "[", "8", ";", Pn, ";", Pn, "t" ;
Pn           = digit, { digit } ;
digit        = "0" | "1" | "2" | "3" | "4"
           | "5" | "6" | "7" | "8" | "9" ;

Parameters​

ParameterDescriptionDefault
rowsNumber of character rows in the text area(unchanged)
colsNumber of character columns in the text area(unchanged)

Description​

This sequence resizes the terminal window so that the text area contains exactly the specified number of rows and columns. It is part of the XTerm CSI Ps ; Ps ; Ps t window manipulation family.

The resulting pixel size depends on the current cell dimensions. For example, resizing to 80 columns by 24 rows with a cell size of 8x16 pixels would produce a text area of 640x384 pixels. The total window size will be larger due to window decorations and padding.

If a parameter is omitted or zero, that dimension should remain unchanged, though behavior varies between implementations. This is the preferred method for resizing a terminal to a standard size (e.g., 80x24 or 132x43) because it operates in the same units that applications use.

The Text Area Size (chars) report (CSI 18 t) can be used to query the current text area dimensions in characters after resizing.

note

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 to standard 80x24 terminal
printf '\e[8;24;80t'

# Resize to 132-column mode (DEC wide)
printf '\e[8;43;132t'

# Resize to 120 columns, 40 rows
printf '\e[8;40;120t'

Specifications​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoRejected per escape_support.md:81-82
Bobcat✓0.9.0Handled via WhenSetSize callback; requires WindowActions enabled in profile
contour✓v0.1.0CSI 8;rows;cols t implemented in WINDOWMANIP (case 8)
foot✗NoCSI 8 t logs unimplemented warning
Ghostty✗NoCSI 8;rows;cols t not implemented
iTerm2✓v20260216-nightlyCSI 8;rows;cols t via XTERMCC_WINDOWSIZE
Kitty✗NoCSI 8 t explicitly rejected
Konsole✓YesCSI 8;rows;cols t emits imageResizeRequest
mintty✓YesCSI 8;rows;cols t implemented
mlterm✓rel-3_8_0CSI 8 t supported
PuTTY✓0.75CSI 8 t supported at terminal.c:4899-4908
Rio✗No
rxvt-unicode✓1.2
st✗NoNo CSI t window manipulation sequences implemented
terminology✓v1.10.0CSI 8;rows;cols t
VT100✗No
VTE✓YesEmits resize-window signal
WezTerm✗NoParsed but not allowed for security
Windows Terminal✓YesCSI 8;rows;cols t via WindowManipulationType::ResizeWindowInCharacters in adaptDispatch.cpp:3451
xterm✓xterm-93
xterm.js✓4.4.0CSI 8;rows;cols t. Requires windowOptions.setWinSizeChars enabled.
Multiplexers
cy✗NoExplicitly ignored
GNU Screen✓v.4.2.0CSI 8;rows;cols t implemented at src/ansi.c:966
tmux✗NoSequence parsed but ignored (case 8 in winops)
tuios✗NoCSI 8 t not handled
Zellij✗No

See also​