notification.go 279 B

12345678910111213
  1. package ansi
  2. // Notify sends a desktop notification using iTerm's OSC 9.
  3. //
  4. // OSC 9 ; Mc ST
  5. // OSC 9 ; Mc BEL
  6. //
  7. // Where Mc is the notification body.
  8. //
  9. // See: https://iterm2.com/documentation-escape-codes.html
  10. func Notify(s string) string {
  11. return "\x1b]9;" + s + "\x07"
  12. }