feat: add system sound alert module

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-10 02:44:45 -04:00
parent c1d10efe7b
commit 3cbe529b7a
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
"""System sound playback."""
from Cocoa import NSSound
from cursor_flasher.config import Config
def play_alert(config: Config) -> None:
"""Play the configured alert sound if enabled."""
if not config.sound_enabled:
return
sound = NSSound.soundNamed_(config.sound_name)
if sound is None:
return
sound.setVolume_(config.sound_volume)
sound.play()