Skip to main content

OSC 777

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Experimental

OSC 777 sends a desktop notification using the format originally introduced by rxvt-unicode (urxvt). The sequence includes a command name, notification title, and notification body.

Syntax​

OSC 777 ; notify ; title ; body ST
Formal syntax
OSC777 = 0x1b, "]", "777", ";", "notify", ";", title, ";", body, ( 0x07 | 0x1b, "\\" ) ;
title  = { printable-char } ;
body   = { printable-char } ;

Parameters​

ParameterDescription
notifyThe command name (literal string notify).
titleThe notification title text.
bodyThe notification body text.

Description​

OSC 777 originated in rxvt-unicode (urxvt) as a general-purpose extension mechanism. The notify subcommand triggers a desktop notification with the specified title and body text. The notification is typically displayed using the system's native notification framework (e.g., D-Bus notifications on Linux, Notification Center on macOS).

The general form of OSC 777 is OSC 777 ; command ; args... ST, where the command name determines the behavior. The notify command is by far the most widely adopted. Other urxvt-specific commands exist but are not commonly supported by other terminals.

Compared to other notification protocols​

ProtocolFormatFeatures
OSC 9OSC 9 ; text STTitle only, no body
OSC 777OSC 777 ; notify ; title ; body STTitle and body
OSC 99 (Kitty)OSC 99 ; key=value STRich: identifiers, callbacks, urgency, multi-part

OSC 777 offers a middle ground between the minimal OSC 9 (which has no body field) and the feature-rich Kitty OSC 99 protocol. For applications that need a simple title-and-body notification with reasonable terminal compatibility, OSC 777 is a practical choice.

note

Some terminals only display the notification when the terminal window is not focused, to avoid interrupting the user unnecessarily. Behavior may vary.

Examples​

# Send a notification with title and body
printf '\e]777;notify;Build Complete;Your project has finished compiling.\e\\'

# Notify when a long-running command finishes
sleep 60 && printf '\e]777;notify;Timer;60 seconds have elapsed.\e\\'

# Using BEL as the string terminator
printf '\e]777;notify;Alert;Something happened.\a'

Specifications​

SpecificationSection
XTerm ctlseqs—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗No
Bobcat??Would be handled by underlying TerminalCtrl library, not directly in Bobcat code
contour✓v0.1.0OSC 777 urxvt-style notifications (NOTIFY) implemented in Functions.h line 638 and Screen.cpp lines 4054,3056-3066, expects format 'notify;title;message'
foot✓1.6.0urxvt-style notifications, specifically the 'notify' command
Ghostty✓v1.0.0urxvt-style notifications
iTerm2✓YesOSC 9 notifications via ITERM_USER_NOTIFICATION token (urxvt-compatible)
Kitty✓0.23.0
Konsole✓YesSupports urxvt-style notifications and container detection (toolbox/distrobox push/pop)
mintty✗NoNo implementation found for OSC 777 urxvt notifications
mlterm✗No
PuTTY✗No
Rio✗No
rxvt-unicode✓6.3URxvt_perl - for Perl extensions with 'extension-name;' format
st✗No
terminology✓v0.8.0Desktop notifications via notify; command
VT100✗No
VTE✓YesRequires enable-legacy-osc777 property; translates to termprops
WezTerm✓20210314-114017-04b7ceddurxvt-style notifications (RxvtExtension)
Windows Terminal✗No
xterm✗Nourxvt-style notifications not implemented
xterm.js✗No
Multiplexers
cy✗No
GNU Screen✗No
tmux✗No
tuios✗No
Zellij✗NoNo OSC 777 notification support found

See also​