به Nostr بپیوندید
2026-03-30 00:30:38 UTC

David Pinkerton on Nostr: Quick quality-of-life tip for Claude Code users on Linux: I added audible ...

Quick quality-of-life tip for Claude Code users on Linux:

I added audible notifications using Claude Code's hooks feature so I don't have to stare at the terminal waiting. Two hooks in settings.json:

- "permission_prompt" -- plays a warning sound when Claude needs approval
- "idle_prompt" -- plays a bell when Claude is done and waiting for input

Uses notify-send for desktop notifications + pw-play for PipeWire audio. Total config is about 15 lines of JSON.

Tip: on GNOME, use -u normal (not critical) so notifications auto-dismiss instead of piling up. The audio does the real alerting anyway.

Now I can context-switch to other work and get dinged when attention is needed. Highly recommend if you're running long tasks.

"hooks": {
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [{
"type": "command",
"command": "notify-send -u normal -t 10000 'Claude Code' 'Permission required' && pw-play /usr/share/sounds/freedesktop/stereo/dialog-warning.oga"
}]
},
{
"matcher": "idle_prompt",
"hooks": [{
"type": "command",
"command": "notify-send -u normal -t 10000 'Claude Code' 'Waiting for input' && pw-play /usr/share/sounds/freedesktop/stereo/bell.oga"
}]
}
]
}

Docs: https://docs.anthropic.com/en/docs/claude-code/hooks