^[control-codes live in libghostty-vt

Operating system commands

OSC 176 Set App ID

Set the app ID that a Wayland compositor, or an X window manager, groups and decorates the terminal's window by.

OSC 176 ; Pt ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
Specification
Custom App ID in terminal emulators

OSC 176 ; Pt ST sets the terminal window’s app ID, the name a Wayland compositor (or the window class an X window manager) uses to pick the window’s icon, to group it with other windows of the same app, and to pin it to a dock. A long-running terminal program, a mail reader or a chat client, can use it to make its window look like the program’s own rather than the terminal’s. An empty Pt removes the app ID again, and OSC 176 ; ? ST asks for it, answered with OSC 176 ; Pt ST. A program is meant to ask on start, set its own, and put the old one back when it exits.

It comes from a short specification by delthas, Custom App ID in terminal emulators, which suggests a terminal honor it only when the program is the only thing in the window, and keep app IDs under 255 characters. It names foot as the terminal that implements it, from 1.17.0. foot ignores a value that is not printable UTF-8, cuts it at 2048 characters, clears it on a full reset, and since 1.20.2 no longer answers the query (foot-ctlseqs(7), osc.c).

A default xterm has no OSC 176 and ignores it (the OSC numbers it knows). The cases follow xterm.

libghostty-vt does not recognize OSC 176 either: its OSC parser in osc.zig has no state for the number, so the string is dropped, and the cases pass.

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-vt83edd49Noignored
Konsole26.11.70, a24c3d71Nonot among the OSC numbers it handles (Vt102Emulation.h)
foot1.28.0Yessets the app ID, but has not answered the query since 1.20.2 (foot-ctlseqs(7))
ConEmubuild 230724, its documentationNonot in its ANSI escape codes

Validation

OSC176-1: Setting it changes nothing on screen

A
\e]176;org.example.mail\e\\
B
|AB____|
cursor 1,3
reply none

OSC176-2: A query is not answered

\e]176;?\e\\
|______|
reply none
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.