From 6aa6c7f71424d355ad01377d302e1881900f2b36 Mon Sep 17 00:00:00 2001 From: Akey Zhang Date: Tue, 9 Jun 2026 19:23:46 +0800 Subject: [PATCH 1/2] style/docs: optimize popover/toggle styling and add Claude Code hook integration to README - Change popover and detail view background to controlBackgroundColor (whitish in light mode). - Set Toggle switch controls to small size (.controlSize(.small)) in StatusControlView. - Document Claude Code hook integration in README.md with custom settings (shell, timeout, and permission requests). --- README.md | 54 ++++++++++++++++++++ Sources/Signal/Views/ClaudeDetailView.swift | 4 +- Sources/Signal/Views/MainView.swift | 4 +- Sources/Signal/Views/StatusControlView.swift | 2 + 4 files changed, 60 insertions(+), 4 deletions(-) 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/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() } } From 15596d1204efb2cf3941ff5e964e030f84d0bfe6 Mon Sep 17 00:00:00 2001 From: Akey Zhang Date: Tue, 9 Jun 2026 19:40:35 +0800 Subject: [PATCH 2/2] bump(Signal): update version to 1.0.2 in Info.plist --- Resources/Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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