Initial commit
This commit is contained in:
37
hooks/hooks.json
Normal file
37
hooks/hooks.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"hooks": {
|
||||
"Notification": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); MSG=$(echo \"$DATA\" | jq -r '.message'); terminal-notifier -message \"$MSG\" -title \"$TITLE\" -sound Ping"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stop": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Claude finished responding\" -title \"$TITLE\" -sound Ping"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PreCompact": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Compacting conversation...\" -title \"$TITLE\" -sound Bottle"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user