Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "handbook-sounds",
|
||||||
|
"description": "Audio feedback for Claude Code events on Windows using PowerShell sounds",
|
||||||
|
"version": "1.12.0",
|
||||||
|
"author": {
|
||||||
|
"name": "nikiforovall",
|
||||||
|
"url": "https://github.com/nikiforovall"
|
||||||
|
},
|
||||||
|
"hooks": [
|
||||||
|
"./hooks"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# handbook-sounds
|
||||||
|
|
||||||
|
Audio feedback for Claude Code events on Windows using PowerShell sounds
|
||||||
25
hooks/hooks.json
Normal file
25
hooks/hooks.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"description": "Audio feedback when Claude finishes responding and sends notifications",
|
||||||
|
"hooks": {
|
||||||
|
"Stop": [
|
||||||
|
{
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/play-sound.sh\" --stop"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Notification": [
|
||||||
|
{
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/play-sound.sh\" --notification"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
28
hooks/play-sound.sh
Normal file
28
hooks/play-sound.sh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Check if hook is disabled via environment variable
|
||||||
|
if [ "${CC_HANDBOOK_SOUNDS_DISABLE_HOOKS:-false}" = "true" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Parse hook type argument
|
||||||
|
hook_type="${1:-stop}"
|
||||||
|
|
||||||
|
# Select sound file based on hook type
|
||||||
|
if [ "$hook_type" = "--stop" ]; then
|
||||||
|
sound_file="${CC_HANDBOOK_STOP_SOUNDS_FILE:-C:/Windows/Media/notify.wav}"
|
||||||
|
elif [ "$hook_type" = "--notification" ]; then
|
||||||
|
sound_file="${CC_HANDBOOK_NOTIFICATION_SOUNDS_FILE:-C:/Windows/Media/Windows Exclamation.wav}"
|
||||||
|
else
|
||||||
|
# Fallback for backward compatibility
|
||||||
|
sound_file="${CC_HANDBOOK_SOUNDS_FILE:-C:/Windows/Media/notify.wav}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Play sound using PowerShell with -NoProfile to avoid oh-my-posh conflicts
|
||||||
|
# Use -NonInteractive to prevent any prompts
|
||||||
|
# Run in background to not block Claude
|
||||||
|
powershell -NoProfile -NonInteractive -Command "(New-Object Media.SoundPlayer '$sound_file').PlaySync();" &
|
||||||
|
|
||||||
|
exit 0
|
||||||
49
plugin.lock.json
Normal file
49
plugin.lock.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:NikiforovAll/claude-code-rules:plugins/handbook-sounds",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "d52647f1aa4d87d70fbce953ceca1d46fb350887",
|
||||||
|
"treeHash": "f750f58093b33aa7ab769131efc2134d4487ffd6fd06727f46877b7df482084c",
|
||||||
|
"generatedAt": "2025-11-28T10:12:15.870942Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "handbook-sounds",
|
||||||
|
"description": "Audio feedback for Claude Code events on Windows using PowerShell sounds",
|
||||||
|
"version": "1.12.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "ed99aa1e2867b1b812308888067be7941026d3a00555dbb3eba380608c771dab"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "hooks/play-sound.sh",
|
||||||
|
"sha256": "7b238c48f44eae5ffc22b208fa5b3f4ca81b979adccef91996b1c5099c34d942"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "hooks/hooks.json",
|
||||||
|
"sha256": "d02c54081741f5cb46d350a5a9540bb91e04c1c4e932298f342b455e4a684fc1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "c5712620891d16a9addd19170c724b1ac44aa0fe46146f6f41c1e9c0ea39fb1b"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "f750f58093b33aa7ab769131efc2134d4487ffd6fd06727f46877b7df482084c"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user