diff --git a/README.md b/README.md index 9bff82f..5bfe15f 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,60 @@ sgnl green # deploy succeeded sgnl red # deploy failed ``` +### Claude Code Hook Integration + +You can integrate `sgnl` with [Claude Code](https://github.com/anthropics/claude-code) hooks to turn your status bar light into a physical/visual indicator of Claude's state! + +Add the following to your project-level or global `.claude/settings.json` file: + +```json +{ + "hooks": { + "SessionStart": [ + { + "type": "command", + "command": "sgnl green", + "shell": "bash", + "timeout": 3 + } + ], + "UserPromptSubmit": [ + { + "type": "command", + "command": "sgnl yellow", + "shell": "bash", + "timeout": 3 + } + ], + "PermissionRequest": [ + { + "matcher": "*", + "hooks": [ + { + "type": "command", + "command": "sgnl red", + "shell": "bash", + "timeout": 3 + } + ] + } + ], + "Stop": [ + { + "type": "command", + "command": "sgnl off", + "shell": "bash", + "timeout": 3 + } + ] + } +} +``` + +- **Green (Idle/Ready)**: Lights up when you start a session or when Claude stops thinking and waits for your input. +- **Yellow (Thinking/Working)**: Breathes with a caution light whenever you submit a prompt and Claude starts executing tools/thinking. + + ## Architecture ``` diff --git a/Resources/Info.plist b/Resources/Info.plist index c4bb282..9cc88fb 100644 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -11,9 +11,9 @@ CFBundleExecutable Signal CFBundleVersion - 1.0.1 + 1.0.2 CFBundleShortVersionString - 1.0.1 + 1.0.2 CFBundlePackageType APPL CFBundleIconFile diff --git a/Sources/Signal/Views/ClaudeDetailView.swift b/Sources/Signal/Views/ClaudeDetailView.swift index 10cd131..c209682 100644 --- a/Sources/Signal/Views/ClaudeDetailView.swift +++ b/Sources/Signal/Views/ClaudeDetailView.swift @@ -40,7 +40,7 @@ struct ClaudeDetailView: View { } .padding(.horizontal, 12) .padding(.vertical, 10) - .background(Color(NSColor.windowBackgroundColor)) + .background(Color(NSColor.controlBackgroundColor)) Divider() @@ -86,7 +86,7 @@ struct ClaudeDetailView: View { } } .navigationBarBackButtonHidden(true) - .background(Color(NSColor.windowBackgroundColor)) + .background(Color(NSColor.controlBackgroundColor)) } } diff --git a/Sources/Signal/Views/MainView.swift b/Sources/Signal/Views/MainView.swift index c362af1..fa96da9 100644 --- a/Sources/Signal/Views/MainView.swift +++ b/Sources/Signal/Views/MainView.swift @@ -18,7 +18,7 @@ struct MainView: View { } .padding(.top, 12) .padding(.horizontal, 16) - .background(Color(NSColor.windowBackgroundColor)) + .background(Color(NSColor.controlBackgroundColor)) Divider() .padding(.top, 8) @@ -34,7 +34,7 @@ struct MainView: View { .frame(maxWidth: .infinity, maxHeight: .infinity) } .frame(width: 350, height: 480) - .background(Color(NSColor.windowBackgroundColor)) + .background(Color(NSColor.controlBackgroundColor)) } } diff --git a/Sources/Signal/Views/StatusControlView.swift b/Sources/Signal/Views/StatusControlView.swift index 0c8a71e..7440758 100644 --- a/Sources/Signal/Views/StatusControlView.swift +++ b/Sources/Signal/Views/StatusControlView.swift @@ -61,6 +61,7 @@ struct StatusControlView: View { EmptyView() } .toggleStyle(.switch) + .controlSize(.small) .labelsHidden() .disabled(!viewModel.currentColor.breathes && viewModel.currentColor != .black) // Disable if color doesn't breathe, except when Off } @@ -84,6 +85,7 @@ struct StatusControlView: View { EmptyView() } .toggleStyle(.switch) + .controlSize(.small) .labelsHidden() } }