Skip to main content

Iconify

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

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
Formal syntax
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.

note

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​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoRejected per escape_support.md:81-82
Bobcat✓0.9.0Handled via WhenWindowMinimize callback; requires WindowActions enabled in profile
contour✗NoNot implemented in WINDOWMANIP handler
foot✗NoCSI 1/2 t logs unimplemented warning
Ghostty✗NoCSI 1/2 t not implemented
iTerm2✓v20260216-nightlyCSI 1 t and CSI 2 t
Kitty✗NoCSI 1/2 t not supported
Konsole✗NoCSI 1 t / 2 t not implemented
mintty✓YesCSI 1/2 t implemented
mlterm✓rel-3_8_0Reports always non-iconified (CSI 1 t)
PuTTY✓0.75CSI 1/2 t supported (de-iconify/iconify) at terminal.c:4855-4863
Rio✗No
rxvt-unicode✓1.2
st✗NoNo CSI t window manipulation sequences implemented
terminology✗No
VT100✗No
VTE✓YesUpdates internal state flag m_xterm_wm_iconified
WezTerm✗NoParsed but explicitly ignored
Windows Terminal✓YesCSI 1/2 t handled via WindowManipulationType::IconifyWindow and DeIconifyWindow in adaptDispatch.cpp:3442-3446
xterm✓xterm-93
xterm.js✓4.4.0CSI 1/2 t. Requires windowOptions.restoreWin/minimizeWin enabled.
Multiplexers
cy✗NoExplicitly ignored
GNU Screen✗NoCSI 1/2 t not implemented
tmux✗NoSequence parsed but ignored (case 1/2 in winops)
tuios✗NoCSI 1/2 t not handled
Zellij✗No

See also​