Maximize
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
maximize = 0x1b, "[", "9", ";", Ps, "t" ; Ps = "0" | "1" | "2" | "3" ;
Parameters
| Value | Description |
|---|---|
0 | Restore (un-maximize) the window |
1 | Maximize the window (fill the screen) |
2 | Maximize the window vertically (full height, keep current width) |
3 | Maximize 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.
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
| 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 WhenWindowMaximize callback; requires WindowActions enabled in profile |
| contour | ✗ | No | Not implemented in WINDOWMANIP handler |
| foot | ✗ | No | CSI 9 t logs unimplemented warning |
| Ghostty | ✗ | No | CSI 9;Ps t not implemented |
| iTerm2 | ✗ | No | CSI 9;Ps t not implemented |
| Kitty | ✗ | No | CSI 9 t not supported |
| Konsole | ✗ | No | CSI 9 t not implemented; UI has maximize but no escape sequence |
| mintty | ✓ | Yes | CSI 9;0/1/2/3 t implemented |
| mlterm | ✓ | rel-3_9_1 | CSI 9 t supported |
| PuTTY | ✓ | 0.75 | CSI 9 t supported at terminal.c:4910-4916 |
| Rio | ✗ | No | |
| rxvt-unicode | ✗ | No | Marked NYI in source (case 9) |
| st | ✗ | No | No CSI t window manipulation sequences implemented |
| terminology | ✗ | No | |
| VT100 | ✗ | No | |
| VTE | ~ | Yes | Parsed with parameters but implementation is stub - breaks without action |
| WezTerm | ✗ | No | Parsed but handled as unimplemented |
| Windows Terminal | ✗ | No | CSI 9;Ps t not in WindowManipulationType enum |
| xterm | ✓ | xterm-93 | Requires --enable-maximize compile flag (default on) |
| xterm.js | ✓ | 4.4.0 | CSI 9;Ps t. Requires windowOptions.maximizeWin enabled. |
| Multiplexers | |||
| cy | ✗ | No | Explicitly ignored |
| GNU Screen | ✗ | No | CSI 9;Ps t not implemented |
| tmux | ✗ | No | Sequence parsed but ignored (case 9 in winops) |
| tuios | ✗ | No | CSI 9 t not handled |
| Zellij | ✗ | No | |
See also
- Fullscreen — Enter or exit fullscreen mode
- Resize (chars) — Resize to specific character dimensions
- Resize (pixels) — Resize to specific pixel dimensions
- Iconify — Minimize or restore the window