Files
dotfiles/.claude/hooks/notify-idle.sh
Ismo Vuorinen cff83e4738 refactor(claude): migrate hooks to external scripts and add new hooks
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.
2026-03-20 04:38:18 +02:00

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