Skip to main content

Maximize

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

Maximize is an XTerm window manipulation sequence that maximizes or restores the terminal window, with options for full, vertical-only, or horizontal-only maximization.

Syntax​

CSI 9 ; Ps t     Maximize or restore window
Formal syntax
maximize = 0x1b, "[", "9", ";", Ps, "t" ;
Ps       = "0" | "1" | "2" | "3" ;

Parameters​

ValueDescription
0Restore (un-maximize) the window
1Maximize the window (fill the screen)
2Maximize the window vertically (full height, keep current width)
3Maximize the window horizontally (full width, keep current height)

Description​

This sequence controls the maximized state of the terminal window. It is part of the XTerm CSI Ps ; Ps ; Ps t window manipulation family.

  • CSI 9 ; 0 t — Restores the window to its size and position before it was maximized.
  • CSI 9 ; 1 t — Maximizes the window to fill the entire screen (or the work area, excluding taskbars and docks).
  • CSI 9 ; 2 t — Maximizes the window vertically only. The window expands to full screen height while retaining its current width and horizontal position.
  • CSI 9 ; 3 t — Maximizes the window horizontally only. The window expands to full screen width while retaining its current height and vertical position.

The vertical and horizontal maximize modes can be combined by issuing both sequences in succession.

This is distinct from Fullscreen mode, which removes window decorations and typically covers the entire display including taskbars.

note

Some terminal emulators disable these sequences by default for security reasons. Check your terminal's configuration for options to enable or disable window manipulation sequences. Partial maximization (vertical/horizontal only) may not be supported by all terminals.

Examples​

# Maximize the window
printf '\e[9;1t'

# Restore the window
printf '\e[9;0t'

# Maximize vertically only
printf '\e[9;2t'

# Maximize horizontally only
printf '\e[9;3t'

Specifications​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoRejected per escape_support.md:81-82
Bobcat✓0.9.0Handled via WhenWindowMaximize callback; requires WindowActions enabled in profile
contour✗NoNot implemented in WINDOWMANIP handler
foot✗NoCSI 9 t logs unimplemented warning
Ghostty✗NoCSI 9;Ps t not implemented
iTerm2✗NoCSI 9;Ps t not implemented
Kitty✗NoCSI 9 t not supported
Konsole✗NoCSI 9 t not implemented; UI has maximize but no escape sequence
mintty✓YesCSI 9;0/1/2/3 t implemented
mlterm✓rel-3_9_1CSI 9 t supported
PuTTY✓0.75CSI 9 t supported at terminal.c:4910-4916
Rio✗No
rxvt-unicode✗NoMarked NYI in source (case 9)
st✗NoNo CSI t window manipulation sequences implemented
terminology✗No
VT100✗No
VTE~YesParsed with parameters but implementation is stub - breaks without action
WezTerm✗NoParsed but handled as unimplemented
Windows Terminal✗NoCSI 9;Ps t not in WindowManipulationType enum
xterm✓xterm-93Requires --enable-maximize compile flag (default on)
xterm.js✓4.4.0CSI 9;Ps t. Requires windowOptions.maximizeWin enabled.
Multiplexers
cy✗NoExplicitly ignored
GNU Screen✗NoCSI 9;Ps t not implemented
tmux✗NoSequence parsed but ignored (case 9 in winops)
tuios✗NoCSI 9 t not handled
Zellij✗No

See also​