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/hooksPublished at
2026-03-30 00:30:38 UTCEvent JSON
{
"id": "690578e3b5441617243b213f869afc9ffd681ea17a69c0660eafa668cbe58bf3",
"pubkey": "909e3fdc259a211ead564dc589e34a81aef214665d5e6889ef8bb6d473f2b10a",
"created_at": 1774830638,
"kind": 1,
"tags": [],
"content": "Quick quality-of-life tip for Claude Code users on Linux:\n\nI 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:\n\n- \"permission_prompt\" -- plays a warning sound when Claude needs approval\n- \"idle_prompt\" -- plays a bell when Claude is done and waiting for input\n\nUses notify-send for desktop notifications + pw-play for PipeWire audio. Total config is about 15 lines of JSON.\n\nTip: on GNOME, use -u normal (not critical) so notifications auto-dismiss instead of piling up. The audio does the real alerting anyway.\n\nNow I can context-switch to other work and get dinged when attention is needed. Highly recommend if you're running long tasks.\n\n\"hooks\": {\n \"Notification\": [\n {\n \"matcher\": \"permission_prompt\",\n \"hooks\": [{\n \"type\": \"command\",\n \"command\": \"notify-send -u normal -t 10000 'Claude Code' 'Permission required' \u0026\u0026 pw-play /usr/share/sounds/freedesktop/stereo/dialog-warning.oga\"\n }]\n },\n {\n \"matcher\": \"idle_prompt\",\n \"hooks\": [{\n \"type\": \"command\",\n \"command\": \"notify-send -u normal -t 10000 'Claude Code' 'Waiting for input' \u0026\u0026 pw-play /usr/share/sounds/freedesktop/stereo/bell.oga\"\n }]\n }\n ]\n}\n\nDocs: https://docs.anthropic.com/en/docs/claude-code/hooks",
"sig": "389cfbcdeffdf3a6ff52e08d681a0fdf5a6bb5508c3688eb34699ee35075062616797f2d7ae7a2d6e42f82d389d8796b1aa428982edf9896add6f1662834f5ab"
}