Documentation
¶
Overview ¶
Package notify plays short notification sounds from the vix TUI: one when a turn ends and one when the agent needs the user. Sounds are chosen from a set that always includes vix's own bundled sounds (embedded in the binary, so the list is never empty on any platform) plus whatever sounds the operating system ships. Playback shells out to the platform's audio player and is best-effort: if no player is available it is a silent no-op.
Index ¶
Constants ¶
const ( DefaultTurnEndSound = "Chime" DefaultNeedsYouSound = "Ping" )
Default sound names. Both are bundled, so they resolve on every platform.
Variables ¶
This section is empty.
Functions ¶
func Play ¶
func Play(name string)
Play plays the named sound, fire-and-forget. It is a silent no-op when sound is disabled, the name does not resolve, or no player is available.
func PlayPreview ¶
func PlayPreview(name string)
PlayPreview plays the named sound as a preview, stopping any preview still playing first. Used by the Settings picker so scrolling through sounds does not stack them on top of each other.
Types ¶
type Sound ¶
type Sound struct {
Name string // display + stored key, e.g. "Chime" or "Glass"
Path string // absolute path to a playable file on disk
}
Sound is a selectable notification sound.
func AvailableSounds ¶
func AvailableSounds() []Sound
AvailableSounds returns the bundled sounds first, then any system sounds found on this platform, sorted by name. The result is computed once per process and cached — callers may hold onto the slice for the lifetime of the process.