OSC 1 — Set icon name (separate from window title)
Set the X11-style icon name independent of the visible window title — historically the label shown when the window is minimised.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b]1;ICON-NAME\x07\033]1;ICON-NAME\007\e]1;ICON-NAME\aESC ] 1 ; ICON-NAME BEL1b 5d 31 3b ... 07Description
OSC 1 sets the icon name — historically the short label X11 showed for a minimised window (versus OSC 2 which set the long title visible in the title bar). OSC 0 sets both at once; OSC 1 sets only the icon name; OSC 2 sets only the title. On X11/xterm + gnome-terminal + konsole + mlterm + foot this still works as designed — the window manager picks up the icon-name attribute via XSetWMIconName. On non-X11 terminals (Windows Terminal, iTerm2, kitty, alacritty, wezterm, ghostty) there is no separate icon-name surface to render to, so most ignore OSC 1 entirely or quietly treat it as a no-op. Use OSC 0 if you want both updated together (the safe default for cross-platform tools); use OSC 1 only when you specifically need to leave the title bar untouched while updating the minimised label.
Spec citation: xterm-ctlseqs (OSC 1)
Examples
printf '\033]1;build-watch\007' # icon name only; title bar untouchedimport sys; sys.stdout.write('\x1b]1;build-watch\x07')fmt.Print("\x1b]1;build-watch\x07")process.stdout.write('\x1b]1;build-watch\x07')printf("\x1b]1;build-watch\x07");Terminal support
- xterm
- yes
- Linux console (fbcon)
- no
- macOS Terminal.app
- no
- iTerm2
- no
- Windows Terminal
- no
- cmd.exe / ConPTY
- no
- kitty
- no
- alacritty
- no
- WezTerm
- no
- Ghostty
- no
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | no | no | no | no | no | no | no | no | no | yes | yes | no | no |