Skip to main content

State report

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

Window State Report is an XTerm window manipulation sequence that queries whether the terminal window is currently iconified (minimized) or open.

Syntax​

CSI 11 t           Request window state
CSI 1 t Response: window is open (not iconified)
CSI 2 t Response: window is iconified
Formal syntax
(* Request *)
state_request  = 0x1b, "[", "1", "1", "t" ;

(* Response *)
state_response = 0x1b, "[", Ps, "t" ;
Ps             = "1" | "2" ;                (* 1 = open, 2 = iconified *)

Response​

ResponseMeaning
CSI 1 tWindow is open (not iconified)
CSI 2 tWindow is iconified (minimized)

Description​

This sequence queries the terminal for its current iconified state. It is part of the XTerm CSI Ps ; Ps ; Ps t window manipulation family.

When the terminal receives CSI 11 t, it responds on the input stream with either CSI 1 t (if the window is open and visible) or CSI 2 t (if the window is iconified/minimized).

Note that the response values (1 and 2) correspond to the same parameter values used by the Iconify sequences: CSI 1 t (de-iconify) and CSI 2 t (iconify). Care must be taken when parsing responses to distinguish between a state report response and other window manipulation sequences.

Applications may use this report to detect whether the user has minimized the terminal window, allowing them to pause rendering or reduce resource usage while the window is not visible.

Examples​

# Query window state
printf '\e[11t'

# Read the response
printf '\e[11t'; read -st 1 -d t response; echo "$response"

Specifications​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoRejected per escape_support.md:81-82
Bobcat✓0.9.0Requires WindowReports enabled in profile
contour✗NoNot implemented in WINDOWMANIP handler
foot~YesCSI 11 t always reports not-iconified - doesn't know actual state
Ghostty✗NoCSI 11 t not implemented
iTerm2✓v20260216-nightlyCSI 11 t via XTERMCC_REPORT_WIN_STATE
Kitty✗NoCSI 11 t not supported
Konsole✗NoCSI 11 t not implemented
mintty✓YesCSI 11 t implemented
mlterm✓rel-3_8_0CSI 11 t reports always non-iconified
PuTTY✓0.75CSI 11 t supported at terminal.c:4918-4922
Rio✗No
rxvt-unicode✓1.2
st✗NoNo CSI t window manipulation sequences implemented
terminology✗No
VT100✗No
VTE✓YesReports iconified state from internal flag
WezTerm✗NoParsed but handled as unimplemented
Windows Terminal✗NoCSI 11 t not in WindowManipulationType enum
xterm✓xterm-93
xterm.js✓4.4.0CSI 11 t. Requires windowOptions.getWinState enabled.
Multiplexers
cy✗NoExplicitly ignored
GNU Screen✓v.4.2.0CSI 11 t reports iconified/not at src/ansi.c:976
tmux✗NoSequence parsed but ignored (case 11 in winops)
tuios✗NoCSI 11 t not handled
Zellij✗No

See also​