commit d8faad5a5e8a0fc30ded88e31af5ef5af7e37dad Author: Zhongwei Li Date: Sun Nov 30 09:03:31 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..d8d7943 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "media", + "description": "Auto-play/pause media on prompt submit/stop", + "version": "1.0.0", + "author": { + "name": "zbeyens" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..cd5aa4a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# media + +Auto-play/pause media on prompt submit/stop diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..64bf450 --- /dev/null +++ b/hooks/hooks.json @@ -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" + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..d226b66 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:udecode/dotai:.claude-plugin/plugins/media", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "44f2d8c43e2efd468f1948751079b54551e7b6db", + "treeHash": "1c24d5f08009fafa3ae0906a7c6eb0c85f154b5fe5ad0eb8698ed9b75baccc04", + "generatedAt": "2025-11-28T10:28:48.698676Z", + "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": "media", + "description": "Auto-play/pause media on prompt submit/stop", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "12389162d76b370b91c74eb97968284ac88a77319eb9635220d0faf5e12b9777" + }, + { + "path": "hooks/hooks.json", + "sha256": "a3d49f48d7855b9b789dc9ca2bdfadbab73012861b54e8bbbbb8cd6f38f40bf9" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "fc13f9a427ab31944d1f866b054b6b1291506ceeb6107eae70345e9a7a0fc738" + } + ], + "dirSha256": "1c24d5f08009fafa3ae0906a7c6eb0c85f154b5fe5ad0eb8698ed9b75baccc04" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file