-
Notifications
You must be signed in to change notification settings - Fork 2
files core monitor menubarconfigurationsection swift a4107e16
ventaphobia edited this page Apr 23, 2026
·
1 revision
- Area: Menu bar.
- This page records the file's current repository role, source metadata, and recent commit history.
- Review nearby tests and commit pages before changing this file.
| Field | Value |
|---|---|
| Source path | Core-Monitor/MenuBarConfigurationSection.swift |
| Wiki area | Menu bar |
| Exists in current checkout | True |
| Size | 9189 bytes |
| Binary | False |
| Line count | 257 |
| Extension | .swift |
SwiftUI
| Kind | Name | Line |
|---|---|---|
| struct | MenuBarSettingsCard |
2 |
| struct | Snapshot |
4 |
| func | detail |
125 |
| func | preview |
142 |
| func | binding |
169 |
| struct | MenuBarPresetChip |
177 |
| struct | MenuBarToggleRow |
223 |
| Commit | Date | Subject |
|---|---|---|
f2db2d4 |
2026-04-16 | Show live network rates in menu bar settings preview |
58feb7a |
2026-04-16 | Add network menu bar item and popover |
4709cd6 |
2026-04-16 | Add live fan RPM to the balanced menu bar |
4334e21 |
2026-04-16 | Refine menu bar default density and preset guidance |
25fb436 |
2026-04-15 | Improve dashboard controls and menu bar configuration |
- Prefer focused changes that respect the ownership described above.
- If this file touches helper trust, SMC writes, startup, or permissions, update the relevant support docs and tests.
- If this file is generated or an asset manifest, verify the producing workflow instead of hand-editing generated payloads.
import SwiftUI
struct MenuBarSettingsCard: View {
struct Snapshot {
var cpuUsagePercent: Double
var fanSpeeds: [Int]
var memoryUsagePercent: Double
var networkDownloadBytesPerSecond: Double
var networkUploadBytesPerSecond: Double
var diskUsagePercent: Double
var cpuTemperature: Double?
}
@ObservedObject private var menuBarSettings = MenuBarSettings.shared
let snapshot: Snapshot
var body: some View {
CoreMonGlassPanel(
cornerRadius: 18,
tintOpacity: 0.12,
strokeOpacity: 0.14,
shadowRadius: 10,
contentPadding: 16
) {
VStack(alignment: .leading, spacing: 14) {
header
presetSection
toggleSection
if let warning = menuBarSettings.lastWarning, !warning.isEmpty {
Text(warning)
.font(.system(size: 11, weight: .medium))
.foregroundStyle(.orange)
}
}
}
}
private var header: some View {
- Home
- Start Here
- Product Overview
- Runtime Architecture
- Monitoring Pipeline
- Fan Control
- Privileged Helper
- Touch Bar
- Release Automation
- Security Model
- File Index (279)
- Every Commit (401)
- Chronological Change Log
- Removed Parts
- All Deleted Paths
- Branches And Tags
- Wiki Manifest
- Start Here
- Product Overview
- Source Map
- Runtime Architecture
- App Startup And Lifecycle
- Dashboard Architecture
- Menu Bar Architecture
- Monitoring Pipeline
- Snapshot Trends And Freshness
- CPU GPU Memory Disk Network
- Battery Power And Thermals
- SMC And Apple Silicon
- Fan Control
- Custom Fan Curves
- Privileged Helper
- XPC Trust Boundary
- Helper Diagnostics
- Touch Bar Architecture
- Touch Bar Customization
- Weather And Location
- Privacy And Permissions
- Onboarding And Help
- Legacy Alerts
- Kernel Panic Weird Mode