^[control-codes
live in libghostty-vt

Operating system commands

OSC 21337 Session Status

View as Markdown

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

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984NoOSC is not among the controls it recognizes (§4.2)
VT510manual, 1st ed., 1993Noignores an OSC string (chapter 4)
xtermpatch 412, xterm-411aNoignored
libghostty-vt0f171f6Noignored
Konsole26.11.70, a24c3d71Nonot in its source
iTerm23.7.3, its documentationYesProprietary Escape Codes, Session Status
ConEmubuild 230724, its documentationNonot 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 ""
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.