Iconify
Iconify and De-iconify are XTerm window manipulation sequences that minimize (iconify) or restore (de-iconify) the terminal window.
Syntax
CSI 1 t De-iconify (restore/raise) window
CSI 2 t Iconify (minimize) window
de_iconify = 0x1b, "[", "1", "t" ; iconify = 0x1b, "[", "2", "t" ;
Description
These sequences control the iconified (minimized) state of the terminal window. They are part of the XTerm CSI Ps ; Ps ; Ps t window manipulation family.
CSI 1 t— De-iconifies the window. If the window is currently minimized, it is restored to its previous size and position and raised to the front of the window stack.CSI 2 t— Iconifies the window. The window is minimized to the taskbar or dock, removing it from the visible desktop.
These operations map directly to the corresponding window manager actions. On systems without a traditional window manager (such as tiling window managers or terminal multiplexers), these sequences may be ignored or have no visible effect.
The Window State Report (CSI 11 t) can be used to query the current iconified state of the window.
Some terminal emulators disable these sequences by default for security reasons, as a malicious application could minimize a user's terminal unexpectedly. Check your terminal's configuration for options to enable or disable window manipulation sequences.
Examples
# Minimize the terminal window
printf '\e[2t'
# Restore the terminal window
printf '\e[1t'
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 WhenWindowMinimize callback; requires WindowActions enabled in profile |
| contour | ✗ | No | Not implemented in WINDOWMANIP handler |
| foot | ✗ | No | CSI 1/2 t logs unimplemented warning |
| Ghostty | ✗ | No | CSI 1/2 t not implemented |
| iTerm2 | ✓ | v20260216-nightly | CSI 1 t and CSI 2 t |
| Kitty | ✗ | No | CSI 1/2 t not supported |
| Konsole | ✗ | No | CSI 1 t / 2 t not implemented |
| mintty | ✓ | Yes | CSI 1/2 t implemented |
| mlterm | ✓ | rel-3_8_0 | Reports always non-iconified (CSI 1 t) |
| PuTTY | ✓ | 0.75 | CSI 1/2 t supported (de-iconify/iconify) at terminal.c:4855-4863 |
| Rio | ✗ | No | |
| rxvt-unicode | ✓ | 1.2 | |
| st | ✗ | No | No CSI t window manipulation sequences implemented |
| terminology | ✗ | No | |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | Updates internal state flag m_xterm_wm_iconified |
| WezTerm | ✗ | No | Parsed but explicitly ignored |
| Windows Terminal | ✓ | Yes | CSI 1/2 t handled via WindowManipulationType::IconifyWindow and DeIconifyWindow in adaptDispatch.cpp:3442-3446 |
| xterm | ✓ | xterm-93 | |
| xterm.js | ✓ | 4.4.0 | CSI 1/2 t. Requires windowOptions.restoreWin/minimizeWin enabled. |
| Multiplexers | |||
| cy | ✗ | No | Explicitly ignored |
| GNU Screen | ✗ | No | CSI 1/2 t not implemented |
| tmux | ✗ | No | Sequence parsed but ignored (case 1/2 in winops) |
| tuios | ✗ | No | CSI 1/2 t not handled |
| Zellij | ✗ | No | |
See also
- Window State Report — Query whether the window is iconified
- Raise/Lower — Change window stacking order without changing iconified state