From 1d52542d288b6b3177dc2d3a6f84bae3a54a59a7 Mon Sep 17 00:00:00 2001 From: Oleks Date: Sun, 10 May 2026 22:00:01 +0300 Subject: [PATCH] inline hooks into plugin.json (Claude Code didn't pick up hooks.json) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The standalone .claude-plugin/hooks.json file wasn't being read by Claude Code on /reload-plugins ("0 hooks" loaded). Inline the hook block into plugin.json's `hooks` key per the manifest spec — delete hooks.json so the plugin has a single source of truth. Bump to 1.0.1 so the installed cache picks up the change on next auto-update / `claude plugin update`. --- .claude-plugin/hooks.json | 64 ------------------------------------ .claude-plugin/plugin.json | 66 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 66 deletions(-) delete mode 100644 .claude-plugin/hooks.json diff --git a/.claude-plugin/hooks.json b/.claude-plugin/hooks.json deleted file mode 100644 index 5a61b85..0000000 --- a/.claude-plugin/hooks.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "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 0399548..552d6e3 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "hyprpanel-state", - "version": "1.0.0", + "version": "1.0.1", "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,5 +15,67 @@ "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" + } + ] + } + ] + } }