State report
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
(* Request *) state_request = 0x1b, "[", "1", "1", "t" ; (* Response *) state_response = 0x1b, "[", Ps, "t" ; Ps = "1" | "2" ; (* 1 = open, 2 = iconified *)
Response
| Response | Meaning |
|---|---|
CSI 1 t | Window is open (not iconified) |
CSI 2 t | Window 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
| 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 | Requires WindowReports enabled in profile |
| contour | ✗ | No | Not implemented in WINDOWMANIP handler |
| foot | ~ | Yes | CSI 11 t always reports not-iconified - doesn't know actual state |
| Ghostty | ✗ | No | CSI 11 t not implemented |
| iTerm2 | ✓ | v20260216-nightly | CSI 11 t via XTERMCC_REPORT_WIN_STATE |
| Kitty | ✗ | No | CSI 11 t not supported |
| Konsole | ✗ | No | CSI 11 t not implemented |
| mintty | ✓ | Yes | CSI 11 t implemented |
| mlterm | ✓ | rel-3_8_0 | CSI 11 t reports always non-iconified |
| PuTTY | ✓ | 0.75 | CSI 11 t supported at terminal.c:4918-4922 |
| Rio | ✗ | No | |
| rxvt-unicode | ✓ | 1.2 | |
| st | ✗ | No | No CSI t window manipulation sequences implemented |
| terminology | ✗ | No | |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | Reports iconified state from internal flag |
| WezTerm | ✗ | No | Parsed but handled as unimplemented |
| Windows Terminal | ✗ | No | CSI 11 t not in WindowManipulationType enum |
| xterm | ✓ | xterm-93 | |
| xterm.js | ✓ | 4.4.0 | CSI 11 t. Requires windowOptions.getWinState enabled. |
| Multiplexers | |||
| cy | ✗ | No | Explicitly ignored |
| GNU Screen | ✓ | v.4.2.0 | CSI 11 t reports iconified/not at src/ansi.c:976 |
| tmux | ✗ | No | Sequence parsed but ignored (case 11 in winops) |
| tuios | ✗ | No | CSI 11 t not handled |
| Zellij | ✗ | No | |
See also
- Iconify — Minimize or restore the window
- Window Position Report — Query window position
- Text Area Size (chars) — Query text area dimensions