Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 09:03:31 +08:00
commit d8faad5a5e
4 changed files with 85 additions and 0 deletions

26
hooks/hooks.json Normal file
View File

@@ -0,0 +1,26 @@
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "DISABLED=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/get-env.js CLAUDE_MEDIA_DISABLED false 2>/dev/null || echo 'false'); AUTO_START=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/get-env.js CLAUDE_MEDIA_AUTO_START true 2>/dev/null || echo 'true'); if [ \"$DISABLED\" = \"false\" ] && [ \"$AUTO_START\" = \"true\" ]; then media-control play 2>/dev/null || true; fi"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "DISABLED=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/get-env.js CLAUDE_MEDIA_DISABLED false 2>/dev/null || echo 'false'); AUTO_PAUSE=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/get-env.js CLAUDE_MEDIA_AUTO_PAUSE true 2>/dev/null || echo 'true'); if [ \"$DISABLED\" = \"false\" ] && [ \"$AUTO_PAUSE\" = \"true\" ]; then media-control pause 2>/dev/null || true; fi"
}
]
}
]
}
}