<manually_attached_skills>
The user has manually attached the following skills to their message.
These skills contain specific instructions or workflows that the user wants you to follow for this request.
Only read the files if needed, the full skill content is inlined here.
boring.notch is a macOS app that replaces the MacBook's notch with a dynamic, interactive widget.
It displays music playback, notifications, system HUDs, calendar/weather, a file shelf, and more.
References
Detailed module-specific docs live in references/. Consult them when working in the
relevant area:
Reference
When to read
references/design-conventions.md
Colors, typography, spacing, liquid glass mode, glass text modifiers
references/animation-patterns.md
Spring values, matchedGeometryEffect IDs, transitions, gestures
BoringViewModel — Per-screen notch state. Owns notchState (.open/.closed),
notchSize, and transient UI state (hover, drop targeting, camera). Passed via
@EnvironmentObject to all views.
BoringViewCoordinator — Global singleton (BoringViewCoordinator.shared). Controls
which view is displayed (currentView: NotchViews), sneak peek / expanding view state,
first-launch flow, and screen selection. Accessed via @ObservedObject in views.
Defaults (sindresorhus/Defaults) — Persisted user preferences. All keys live in
Constants.swift under extension Defaults.Keys. Use @Default(.keyName) for reactive
bindings in views, Defaults[.keyName] for read-only access.
Adding a New Setting
Add the key to Constants.swift:
swift
static let myFeature = Key<Bool>("myFeature", default: false)
Use @Default(.myFeature) var myFeature in views that react to changes.
Add a toggle in NotchSettingsView (in-notch) and/or SettingsView (external window).
Manager / Singleton Pattern
Every system-level service follows this pattern:
swift
@MainActor
class FooManager: NSObject, ObservableObject {
static let shared = FooManager()
@Published var someState: Type = defaultValue
private override init() {
super.init()
// setup observers, timers, etc.
}
func startMonitoring() { ... }
func stopMonitoring() { ... }
}
Key rules:
Always @MainActor if the manager drives UI via @Published.
Use static let shared — never create multiple instances.
Access in views with @ObservedObject var foo = FooManager.shared.
Prefer NSObject base class when interfacing with system APIs (CoreAudio, CoreLocation, etc.).
View Composition
ContentView is the root. It builds the notch layout in layers:
Add a case to NotchViews enum in enums/generic.swift.
Add the case to the switch coordinator.currentView in ContentView.NotchLayout().
If the view needs a different notch size, update vm.notchSize when switching to it.
If it needs keyboard input, see references/window-and-input.md for canBecomeKey setup.
Enum Conventions
Simple state enums: bare cases (NotchState, NotchViews, Style)
User-facing enums with persistence: String raw values + Defaults.Serializable
Add CaseIterable, Identifiable when used in pickers
Associated values for complex state: CalendarSelectionState, EventType
Common Patterns
Conditional Modifiers
swift
.conditionalModifier(someCondition) { view in
view.someModifier()
}
Defined in ConditionalModifier.swift. Use instead of ternary-in-modifier for complex logic.
Sneak Peek / Expanding View
Transient HUDs (volume, brightness, notifications) use coordinator.toggleSneakPeek().
This shows a brief overlay in the closed notch, then auto-dismisses after a timeout.
Checklist for New Features
Create the manager (if needed) in managers/ following the singleton pattern.
Add settings keys to Constants.swift.
Create views in the appropriate components/ subdirectory.
Wire into ContentView — either in NotchLayout() for closed-state displays, or in
the switch coordinator.currentView for open-state views.
Add project.pbxproj entries for all new files (see references/xcode-integration.md).
Add toggles to NotchSettingsView and/or SettingsView.
Use existing animation values (see references/animation-patterns.md) — don't invent new springs.
Test both open and closed notch states, and with liquid glass on/off.
If the new view is full-height (like settings), add it to scrollLocked set in
handleUpGesture and to the needsTall check in onChange(of: currentView).
For widgets: add to WidgetHubView with enable toggle. Add a HomeWidget case
for home view placement. Add to homeWidgets default order in HomeWidget.defaultOrder.
</manually_attached_skills>