From daf1f1169f58a10313ed01635d3cfce8874ea79c Mon Sep 17 00:00:00 2001 From: Oleks Date: Sun, 10 May 2026 22:03:15 +0300 Subject: [PATCH] move hooks to .claude-plugin/hooks/hooks.json (canonical location) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per Claude Code's plugin spec at https://code.claude.com/docs/en/plugins.md, hooks must live at `.claude-plugin/hooks/hooks.json` — a `hooks/` subdirectory inside `.claude-plugin/`. v1.0.0 had `hooks.json` directly under `.claude-plugin/` (loaded 0 hooks); v1.0.1 inlined into `plugin.json` (also not supported). v1.0.2 puts the file at the documented path. Schema is unchanged — three-level nesting (event → matcher list → handler list), same as user settings.json. `${CLAUDE_PLUGIN_ROOT}` substitution is supported here. --- .claude-plugin/hooks/hooks.json | 64 ++++++++++++++++++++++++++++++++ .claude-plugin/plugin.json | 66 +-------------------------------- 2 files changed, 66 insertions(+), 64 deletions(-) create mode 100644 .claude-plugin/hooks/hooks.json diff --git a/.claude-plugin/hooks/hooks.json b/.claude-plugin/hooks/hooks.json new file mode 100644 index 0000000..5a61b85 --- /dev/null +++ b/.claude-plugin/hooks/hooks.json @@ -0,0 +1,64 @@ +{ + "hooks": { + "UserPromptSubmit": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh UserPromptSubmit" + } + ] + } + ], + "PreToolUse": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh PreToolUse" + } + ] + } + ], + "PostToolUse": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh PostToolUse" + } + ] + } + ], + "Notification": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh Notification" + } + ] + } + ], + "Stop": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh Stop" + } + ] + } + ], + "SessionEnd": [ + { + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh SessionEnd" + } + ] + } + ] + } +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 552d6e3..c0ce295 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "hyprpanel-state", - "version": "1.0.1", + "version": "1.0.2", "description": "Surfaces per-window Claude Code state in the Hyprland workspaces bar (HyprPanel). Wires hooks for UserPromptSubmit / PreToolUse / PostToolUse / Notification / Stop / SessionEnd that write state tokens to /tmp/hyprpanel-claude/ for the bar to read. Each kitty's icon and pip indicator reflects whether claude is active (blue), waiting on input (orange ●), done (green ✔), or sleeping for a /loop ScheduleWakeup (cyan ⧗). Companion to the workspaces patch in projects/hyprpanel-dev — installed bar binary needs that patch for the visuals; this plugin only owns the hook side.", "author": { "name": "oleks", @@ -15,67 +15,5 @@ "claude-state", "desktop-integration", "linux" - ], - "hooks": { - "UserPromptSubmit": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh UserPromptSubmit" - } - ] - } - ], - "PreToolUse": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh PreToolUse" - } - ] - } - ], - "PostToolUse": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh PostToolUse" - } - ] - } - ], - "Notification": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh Notification" - } - ] - } - ], - "Stop": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh Stop" - } - ] - } - ], - "SessionEnd": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/hyprpanel-state.sh SessionEnd" - } - ] - } - ] - } + ] }