Documentation
¶
Index ¶
- Constants
- func BuildITermRequestAttention(fireworks bool) string
- func BuildITermStealFocus() string
- func BuildOSC8Hyperlink(url, text string) string
- func BuildOSC8HyperlinkWithID(url, text, id string) string
- func BuildOSC9(message string) string
- func BuildOSC9Progress(state, progress int) string
- func BuildOSC9ProgressClear() string
- func BuildOSC99(message, title string, urgency int, id string) string
- func BuildOSC99Close(id string) string
- func BuildOSC133CommandExecuted() string
- func BuildOSC133CommandFinished(exitCode int) string
- func BuildOSC133CommandStart() string
- func BuildOSC133PromptStart() string
- func BuildOSC777(message, title string) string
- func Sanitize(s string) string
- func SanitizeID(id string) string
- func WrapForMultiplexer(sequence string) string
Constants ¶
const ( UrgencyLow = 0 UrgencyNormal = 1 UrgencyCritical = 2 )
Urgency levels for OSC 99 notifications.
const ( ProgressHidden = 0 // Remove progress indicator ProgressNormal = 1 // Normal/green progress ProgressError = 2 // Error/red progress ProgressIndeterminate = 3 // Indeterminate/pulsing ProgressPaused = 4 // Paused/yellow progress )
Progress states for OSC 9;4
Variables ¶
This section is empty.
Functions ¶
func BuildITermRequestAttention ¶ added in v0.1.1
BuildITermRequestAttention builds an iTerm2 OSC 1337 RequestAttention sequence. This bounces the dock icon on macOS to get the user's attention. fireworks: if true, shows a brief fireworks animation.
func BuildITermStealFocus ¶ added in v0.1.1
func BuildITermStealFocus() string
BuildITermStealFocus builds an iTerm2 OSC 1337 StealFocus sequence. This brings the iTerm2 window to the front.
func BuildOSC8Hyperlink ¶ added in v0.1.1
BuildOSC8Hyperlink wraps text in an OSC 8 hyperlink sequence. Format: ESC ] 8 ; params ; URI ST text ESC ] 8 ; ; ST Supported by most modern terminals: iTerm2, VTE, kitty, WezTerm, Windows Terminal, etc.
func BuildOSC8HyperlinkWithID ¶ added in v0.1.1
BuildOSC8HyperlinkWithID wraps text in an OSC 8 hyperlink with an ID parameter. The ID allows grouping multiple hyperlinks that should be treated as one.
func BuildOSC9 ¶
BuildOSC9 builds an OSC 9 notification sequence (iTerm2 style, message only). Format: ESC ] 9 ; message BEL
func BuildOSC9Progress ¶ added in v0.1.1
BuildOSC9Progress builds an OSC 9;4 progress sequence. Format: ESC ] 9 ; 4 ; state ; progress BEL Supported by Windows Terminal, Ghostty, ConEmu, Mintty.
func BuildOSC9ProgressClear ¶ added in v0.1.1
func BuildOSC9ProgressClear() string
BuildOSC9ProgressClear builds an OSC 9;4 sequence to clear progress.
func BuildOSC99 ¶
BuildOSC99 builds an OSC 99 notification sequence (Kitty style, full-featured). Format: ESC ] 99 ; metadata ; payload ST For simple notifications: ESC ] 99 ; ; message ST For title + body: uses d=0/1 for done flag and p=title/body
func BuildOSC99Close ¶
BuildOSC99Close builds an OSC 99 close notification sequence. Format: ESC ] 99 ; i=<id>:p=close ; ST
func BuildOSC133CommandExecuted ¶ added in v0.1.1
func BuildOSC133CommandExecuted() string
BuildOSC133CommandExecuted marks the start of command execution. Format: OSC 133 ; C ST
func BuildOSC133CommandFinished ¶ added in v0.1.1
BuildOSC133CommandFinished marks the end of command execution. Format: OSC 133 ; D ; exitcode ST
func BuildOSC133CommandStart ¶ added in v0.1.1
func BuildOSC133CommandStart() string
BuildOSC133CommandStart marks the end of prompt/start of user input. Format: OSC 133 ; B ST
func BuildOSC133PromptStart ¶ added in v0.1.1
func BuildOSC133PromptStart() string
BuildOSC133PromptStart marks the beginning of a shell prompt. Format: OSC 133 ; A ST
func BuildOSC777 ¶
BuildOSC777 builds an OSC 777 notification sequence (rxvt-unicode style). Format: ESC ] 777 ; notify ; title ; body BEL
func Sanitize ¶
Sanitize removes control characters and semicolons from a string. Semicolons are replaced with colons to avoid breaking OSC 777 parsing.
func SanitizeID ¶
SanitizeID sanitizes a notification ID for OSC 99. IDs must only contain [a-zA-Z0-9_-+.] characters.
func WrapForMultiplexer ¶
WrapForMultiplexer wraps an OSC sequence for multiplexer passthrough if needed.
Types ¶
This section is empty.