N

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.

HookCommunityautomationv1.0.0MIT
0 views0 copies

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 afplay with system sounds
  • Linux: Uses paplay (PulseAudio) or aplay (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

SoundPathCharacter
Glass/System/Library/Sounds/Glass.aiffSoft, pleasant
Ping/System/Library/Sounds/Ping.aiffAttention-getting
Pop/System/Library/Sounds/Pop.aiffQuick, subtle
Purr/System/Library/Sounds/Purr.aiffGentle notification
Submarine/System/Library/Sounds/Submarine.aiffDistinctive
Tink/System/Library/Sounds/Tink.aiffLight 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.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates