OSC 21337 Session Status
Set the status text and indicator iTerm2 shows in a tab.
OSC 21337 ; key=value ; … ST
- ECMA-48
- §8.3.89 OSC – Operating System Command, p. 51
- Specification
- Proprietary Escape Codes, iTerm2 documentation
OSC 21337 ; indicator=#rrggbb ; status=text ; status-color=#rrggbb ST sets what iTerm2 shows in the session’s tab: a colored dot, the indicator, and a line of text under the title, the status, in a color of its own. Any field can be left out, and one sent with an empty value clears it. Its definition is iTerm2’s Proprietary Escape Codes page, under Session Status; the iTerm2 page has its other commands.
A default xterm ignores it, as it is not among the OSC numbers it knows, and so does libghostty-vt.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | OSC is not among the controls it recognizes (§4.2) |
| VT510 | manual, 1st ed., 1993 | No | ignores an OSC string (chapter 4) |
| xterm | patch 412, xterm-411a | No | ignored |
| libghostty-vt | 0f171f6 | No | ignored |
| Konsole | 26.11.70, a24c3d71 | No | not in its source |
| iTerm2 | 3.7.3, its documentation | Yes | Proprietary Escape Codes, Session Status |
| ConEmu | build 230724, its documentation | No | not in its ANSI escape codes |
Validation
OSC21337-1: Nothing on screen, and not a title
A
\e]21337;indicator=#ff0000;status=busy\a
B
|AB____|
cursor 1,3
title ""