Expand description
Terminal desktop-notification protocols (grok-build parity).
Different terminals accept desktop notifications through different OSC escape sequences. This module picks the best one the host terminal supports and wraps it for tmux passthrough when needed.
| Protocol | Terminals | Sequence |
|---|---|---|
| OSC 9 | iTerm2, WezTerm, Warp | ESC ] 9 ; <msg> BEL |
| OSC 99 | Kitty, Ghostty | ESC ] 99 ; i=<id> ; <msg> BEL |
| OSC 777 | rxvt-unicode, foot, VTE | ESC ] 777 ; notify ; <title> ; <msg> BEL |
| BEL | fallback | BEL |
Enums§
- Notification
Protocol - The notification protocol a terminal understands.
Functions§
- detect_
protocol - Detect the protocol from the live environment.
- detect_
protocol_ from - Decide the best protocol from environment signals. Pure (no I/O) so it can be unit-tested against synthetic env values.
- emit_
notification - Emit a desktop notification to stderr using the best detected protocol,
wrapping for tmux passthrough when
TMUXis set. - osc8_
file_ link - Wrap a local file path as a
file://OSC 8 hyperlink. - osc8_
hyperlink - Wrap
textin an OSC 8 hyperlink escape pointing tourl. - render_
sequence - Build the raw escape sequence for
protocolcarryingtitle/message. - tmux_
wrap - Wrap an escape sequence for tmux passthrough: every
ESC(0x1b) is doubled and the whole thing is framed withDCS tmux ; … ST.