mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-20 16:07:03 +00:00
Replace inline command strings in settings.json with external scripts in .claude/hooks/ for readability and maintainability. Consolidate three PostToolUse formatters into one script and add markdown/yaml formatting. Add new hooks: SessionStart context banner, Stop lint gate, async Bats test runner, idle desktop notification, and PostToolUseFailure logger.
14 lines
402 B
Bash
Executable File
14 lines
402 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Notification hook: alert when Claude goes idle.
|
|
# Uses pushover if available, falls back to macOS native notification.
|
|
|
|
msg=$(jq -r '.message // "Claude is waiting for input"')
|
|
|
|
if command -v pushover > /dev/null; then
|
|
pushover "Claude Code" "$msg"
|
|
elif command -v osascript > /dev/null; then
|
|
osascript -e "display notification \"$msg\" with title \"Claude Code\""
|
|
fi
|
|
|
|
exit 0
|