Notification Sound Hook
Plays an audio alert when Claude Code pauses for user input. Cross-platform support with macOS system sounds, Linux paplay, and Windows PowerShell. Never miss a prompt when multitasking.
Hook Type
Notification -- Runs when Claude needs user attention (waiting for input or permission).
Description
Plays a system sound whenever Claude Code is waiting for user input. This is especially useful when running long tasks in the background -- you get an audible ping instead of having to keep checking the terminal.
Patterns/Rules
- Triggers on any notification event (permission requests, questions, task completion)
- Uses native system audio commands -- no dependencies required
- Falls back gracefully if audio is unavailable
- macOS: Uses
afplaywith system sounds - Linux: Uses
paplay(PulseAudio) oraplay(ALSA) - Windows: Uses PowerShell
System.Media.SystemSounds
Configuration
Add to .claude/settings.json:
macOS
{ "hooks": { "Notification": [ { "matcher": "", "hooks": [ { "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff &" } ] } ] } }
Linux
{ "hooks": { "Notification": [ { "matcher": "", "hooks": [ { "type": "command", "command": "paplay /usr/share/sounds/freedesktop/stereo/bell.oga &" } ] } ] } }
Windows (Git Bash)
{ "hooks": { "Notification": [ { "matcher": "", "hooks": [ { "type": "command", "command": "powershell -c \"[System.Media.SystemSounds]::Exclamation.Play()\"" } ] } ] } }
Available macOS Sounds
| Sound | Path | Character |
|---|---|---|
| Glass | /System/Library/Sounds/Glass.aiff | Soft, pleasant |
| Ping | /System/Library/Sounds/Ping.aiff | Attention-getting |
| Pop | /System/Library/Sounds/Pop.aiff | Quick, subtle |
| Purr | /System/Library/Sounds/Purr.aiff | Gentle notification |
| Submarine | /System/Library/Sounds/Submarine.aiff | Distinctive |
| Tink | /System/Library/Sounds/Tink.aiff | Light tap |
Action
The hook runs a platform-native audio command in the background (note the & suffix) so it does not block Claude's execution. No script file is needed -- the command runs directly.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Pre-Commit Security Scanner
Pre-commit hook that scans staged files for hardcoded secrets, API keys, passwords, and sensitive data patterns before allowing commits.
Agents Md Watcher
Streamline your workflow with this automatically, loads, agents, configuration. Includes structured workflows, validation checks, and reusable patterns for automation.
Automated Build Inspector
Boost productivity using this automatically, trigger, build, processes. Includes structured workflows, validation checks, and reusable patterns for automation.