wire / terminal-osc / 9
OSC 9 is overloaded across vendors. iTerm2 uses OSC 9 ; message ST to post a simple desktop notification. ConEmu introduced OSC 9 ; 4 ; state ; progress ST to drive a taskbar progress indicator, which Windows Terminal adopted. Because the same command number carries two unrelated meanings, parsers must look at the first sub-parameter.
aka: OSC 9 · ESC ] 9 · desktop notification · taskbar progress · ConEmu progress · OSC 9;4
OSC introducer: \x1b] ESC ] (0x1B 0x5D)
terminator (ST|BEL): ST \x1b\ · BEL \x07
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| notify | Notification (iTerm2) | \x1b]9;Build finished\x1b\ | OSC 9 ; <message> ST posts a desktop notification with the given text (iTerm2). No sub-parameter '4'. |
| progress | Progress (ConEmu / Windows Terminal) | \x1b]9;4;1;50\x1b\ | OSC 9 ; 4 ; st ; pr ST sets a taskbar progress indicator: st = 0 remove, 1 normal, 2 error, 3 indeterminate, 4 paused; pr = 0..100. Adopted by Windows Terminal from ConEmu. |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-osc/9
or /terminal-osc/9.json