Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleExecutable</key>
<string>Signal</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleIconFile</key>
Expand Down
4 changes: 2 additions & 2 deletions Sources/Signal/Views/ClaudeDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct ClaudeDetailView: View {
}
.padding(.horizontal, 12)
.padding(.vertical, 10)
.background(Color(NSColor.windowBackgroundColor))
.background(Color(NSColor.controlBackgroundColor))

Divider()

Expand Down Expand Up @@ -86,7 +86,7 @@ struct ClaudeDetailView: View {
}
}
.navigationBarBackButtonHidden(true)
.background(Color(NSColor.windowBackgroundColor))
.background(Color(NSColor.controlBackgroundColor))
}
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/Signal/Views/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
}
}

Expand Down
2 changes: 2 additions & 0 deletions Sources/Signal/Views/StatusControlView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -84,6 +85,7 @@ struct StatusControlView: View {
EmptyView()
}
.toggleStyle(.switch)
.controlSize(.small)
.labelsHidden()
}
}
Expand Down
Loading