Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:26:33 +08:00
commit 7f3a2fde9e
8 changed files with 439 additions and 0 deletions

18
hooks/scripts/notify.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Read JSON input from Claude Code hook
input=$(cat)
# Extract message from JSON (basic parsing)
message=$(echo "$input" | grep -o '"message":"[^"]*"' | cut -d'"' -f4)
title="Claude Code"
# Terminal bell - triggers VSCode visual bell icon
printf '\a'
# Send OS notification
if [[ "$OSTYPE" == "darwin"* ]]; then
osascript -e "display notification \"${message}\" with title \"${title}\" sound name \"Glass\""
elif command -v notify-send &> /dev/null; then
notify-send "${title}" "${message}" -u normal -i terminal
fi