Skip to content

Commit b09dbec

Browse files
committed
Tighten app copy and weather privacy behavior
1 parent b4891fe commit b09dbec

16 files changed

Lines changed: 189 additions & 164 deletions

App-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>LSApplicationCategoryType</key>
2222
<string>public.app-category.utilities</string>
2323
<key>NSLocationWhenInUseUsageDescription</key>
24-
<string>Core Monitor uses your location to show local weather in the Touch Bar.</string>
24+
<string>Core-Monitor uses your location for the optional Touch Bar weather item.</string>
2525
<key>SMPrivilegedExecutables</key>
2626
<dict>
2727
<key>ventaphobia.smc-helper</key>

Core-Monitor.xcodeproj/CoreMonitor-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<plist version="1.0">
44
<dict>
55
<key>NSLocationWhenInUseUsageDescription</key>
6-
<string>Core-Monitor needs your location to display the weather.</string>
6+
<string>Core-Monitor uses your location for the optional Touch Bar weather item.</string>
77
</dict>
88
</plist>

Core-Monitor/ContentView.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ private struct FanControlConflictNotice: View {
514514
.foregroundStyle(.secondary)
515515
.fixedSize(horizontal: false, vertical: true)
516516
}
517-
Text("Reset to System Auto before trusting any new RPM target from Core Monitor.")
517+
Text("Reset to System Auto before trusting a new RPM target from Core-Monitor.")
518518
.font(.system(size: 11, weight: .medium))
519519
.foregroundStyle(.secondary)
520520
}
@@ -678,7 +678,7 @@ private struct FanControlPanel: View {
678678
.buttonStyle(SoftPressButtonStyle())
679679
.disabled(fanController.isCalibrating)
680680

681-
if !fanController.calibrationStatus.isEmpty, fanController.calibrationStatus != "No fan probe run yet." {
681+
if !fanController.calibrationStatus.isEmpty, fanController.calibrationStatus != "Fan key scan has not been run." {
682682
Text(fanController.calibrationStatus)
683683
.font(.system(size: 11, weight: .medium))
684684
.foregroundStyle(.secondary)
@@ -1137,7 +1137,7 @@ private struct DetailPane: View {
11371137
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
11381138
VStack(alignment: .leading, spacing: 3) {
11391139
Text("Launch at Login").font(.system(size: 13, weight: .semibold))
1140-
Text(startupManager.isEnabled ? "Starts automatically with macOS" : "Start manually from Applications")
1140+
Text(startupManager.isEnabled ? "Opens automatically when you sign in" : "Open it manually from Applications")
11411141
.font(.system(size: 11)).foregroundStyle(.secondary)
11421142
}
11431143
Spacer()
@@ -1152,7 +1152,7 @@ private struct DetailPane: View {
11521152
Image(systemName: "exclamationmark.triangle.fill").foregroundStyle(.orange)
11531153
VStack(alignment: .leading, spacing: 3) {
11541154
Text(msg).font(.system(size: 11)).foregroundStyle(.orange)
1155-
Text("Open System Settings General Login Items to approve.")
1155+
Text("Open System Settings > General > Login Items to allow Core-Monitor.")
11561156
.font(.system(size: 10)).foregroundStyle(.secondary)
11571157
}
11581158
}
@@ -1251,7 +1251,7 @@ private struct AboutDetailsPanel: View {
12511251
VStack(alignment: .leading, spacing: 4) {
12521252
Text("App details")
12531253
.font(.system(size: 18, weight: .bold))
1254-
Text("Version, identity and global surface appearance.")
1254+
Text("Version, bundle ID, and appearance.")
12551255
.font(.system(size: 12, weight: .medium))
12561256
.foregroundStyle(.secondary)
12571257
}
@@ -1267,7 +1267,7 @@ private struct AboutDetailsPanel: View {
12671267

12681268
VStack(alignment: .leading, spacing: 8) {
12691269
HStack {
1270-
Label("Global Transparency", systemImage: "circle.lefthalf.filled")
1270+
Label("Interface Opacity", systemImage: "circle.lefthalf.filled")
12711271
.font(.system(size: 12, weight: .semibold))
12721272
Spacer()
12731273
Text("\(Int((appearanceSettings.surfaceOpacity * 100).rounded()))%")
@@ -1276,13 +1276,13 @@ private struct AboutDetailsPanel: View {
12761276
}
12771277
Slider(value: $appearanceSettings.surfaceOpacity, in: 0.0...1.0, step: 0.01)
12781278
.tint(Color.bdAccent)
1279-
Text("Changes dashboard and card translucency across the app.")
1279+
Text("Adjusts dashboard and card translucency.")
12801280
.font(.system(size: 11, weight: .medium))
12811281
.foregroundStyle(.secondary)
12821282
}
12831283

12841284
HStack(spacing: 10) {
1285-
aboutPill("Core Monitor")
1285+
aboutPill("Core-Monitor")
12861286
aboutPill("macOS Dashboard")
12871287
aboutPill("Build \(AppVersion.current)")
12881288
}
@@ -1653,7 +1653,7 @@ private struct TouchBarCustomizationPanel: View {
16531653
}
16541654
.pickerStyle(.segmented)
16551655

1656-
Text("Weather uses Apple WeatherKit. Allow location access for Core Monitor so the live weather widget can show accurate conditions and rain timing.")
1656+
Text("The weather item uses Apple WeatherKit and location access. Remove it if you do not want local weather in the Touch Bar.")
16571657
.font(.system(size: 11, weight: .medium))
16581658
.foregroundStyle(.secondary)
16591659

@@ -1788,7 +1788,7 @@ private struct TouchBarCustomizationPanel: View {
17881788
weatherAttributionError = nil
17891789
} catch {
17901790
weatherAttribution = nil
1791-
weatherAttributionError = "Weather attribution is unavailable until WeatherKit is enabled for the signed app."
1791+
weatherAttributionError = "Weather attribution is available in signed builds with WeatherKit enabled."
17921792
}
17931793
}
17941794
}
@@ -1814,9 +1814,9 @@ private struct BetterDisplayInspiredHero: View {
18141814
.frame(height: 360)
18151815

18161816
VStack(spacing: 6) {
1817-
Text("Core Monitor")
1817+
Text("Core-Monitor")
18181818
.font(.system(size: 22, weight: .bold))
1819-
Text("Thermals, fans and live hardware telemetry.")
1819+
Text("Thermals, fans, and system readings.")
18201820
.font(.system(size: 12, weight: .medium))
18211821
.foregroundStyle(.secondary)
18221822
}
@@ -1885,7 +1885,7 @@ struct BasicModeView: View {
18851885

18861886
private var basicHeader: some View {
18871887
HStack {
1888-
Label("Core Monitor", systemImage: "fanblades.fill")
1888+
Label("Core-Monitor", systemImage: "fanblades.fill")
18891889
.font(.system(size: 12, weight: .bold)).foregroundStyle(.primary)
18901890
Spacer()
18911891
Button { withAnimation(.spring(duration: 0.2)) { modeState.isBasicMode = false } } label: {
@@ -1966,7 +1966,7 @@ struct BasicModeView: View {
19661966
private var basicFooter: some View {
19671967
HStack {
19681968
Circle().fill(systemMonitor.hasSMCAccess ? Color.green : .secondary).frame(width: 5, height: 5)
1969-
Text(systemMonitor.hasSMCAccess ? "SMC OK" : "No SMC").font(.system(size: 9)).foregroundStyle(.secondary)
1969+
Text(systemMonitor.hasSMCAccess ? "SMC Ready" : "SMC Unavailable").font(.system(size: 9)).foregroundStyle(.secondary)
19701970
Spacer()
19711971
}.padding(.horizontal, 16).padding(.vertical, 8)
19721972
}

Core-Monitor/CoreMonTouchBarController.swift

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ final class CoreMonTouchBarController: NSObject {
1818
private var widgets: [NSTouchBarItem.Identifier: PKWidgetInfo] = [:]
1919
private var configuredItems: [NSTouchBarItem.Identifier: TouchBarItemConfiguration] = [:]
2020
private var cachedItems: [NSTouchBarItem.Identifier: NSTouchBarItem] = [:]
21+
private var isStarted = false
22+
private var isWeatherRunning = false
2123

2224
init(weatherProvider: WeatherProviding? = nil, monitor: SystemMonitor? = nil) {
2325
let provider = weatherProvider ?? Self.defaultWeatherProvider()
@@ -51,15 +53,17 @@ final class CoreMonTouchBarController: NSObject {
5153
}
5254

5355
func start() {
56+
isStarted = true
5457
if ownsSystemMonitor {
5558
systemMonitor.startMonitoring()
5659
}
57-
weatherViewModel.start()
60+
updateWeatherMonitoring()
5861
refreshViews()
5962
}
6063

6164
func stop() {
62-
weatherViewModel.stop()
65+
isStarted = false
66+
updateWeatherMonitoring()
6367
if ownsSystemMonitor {
6468
systemMonitor.stopMonitoring()
6569
}
@@ -114,6 +118,7 @@ final class CoreMonTouchBarController: NSObject {
114118
touchBar.defaultItemIdentifiers = identifiers
115119
touchBar.principalItemIdentifier = nil
116120
applyThemeToCachedWidgets(customization.theme)
121+
updateWeatherMonitoring()
117122
}
118123

119124
private func refreshViews() {
@@ -315,6 +320,18 @@ final class CoreMonTouchBarController: NSObject {
315320
items: settings.items.isEmpty ? TouchBarPreset.classic.items : settings.items
316321
)
317322
}
323+
324+
private func updateWeatherMonitoring() {
325+
let shouldRunWeather = isStarted && configuredItems.values.contains(where: { $0.builtInKind == .weather })
326+
guard shouldRunWeather != isWeatherRunning else { return }
327+
328+
isWeatherRunning = shouldRunWeather
329+
if shouldRunWeather {
330+
weatherViewModel.start()
331+
} else {
332+
weatherViewModel.stop()
333+
}
334+
}
318335
}
319336

320337
extension CoreMonTouchBarController: NSTouchBarDelegate {

Core-Monitor/FanController.swift

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ enum FanControlMode: String, CaseIterable {
2020

2121
var title: String {
2222
switch self {
23-
case .smart: return "SMART"
24-
case .silent: return "SILENT"
25-
case .balanced: return "BALANCED"
26-
case .performance: return "PERFORMANCE"
27-
case .max: return "MAX"
28-
case .manual: return "MANUAL"
29-
case .custom: return "CUSTOM"
30-
case .automatic: return "SYSTEM"
23+
case .smart: return "Smart"
24+
case .silent: return "Silent"
25+
case .balanced: return "Balanced"
26+
case .performance: return "Performance"
27+
case .max: return "Max"
28+
case .manual: return "Manual"
29+
case .custom: return "Custom"
30+
case .automatic: return "System"
3131
}
3232
}
3333

3434
var shortTitle: String {
3535
switch self {
36-
case .smart: return "SMART"
37-
case .silent: return "SILENT"
38-
case .balanced: return "BAL"
39-
case .performance: return "PERF"
40-
case .max: return "MAX"
41-
case .manual: return "MANUAL"
42-
case .custom: return "CODE"
43-
case .automatic: return "SYSTEM"
36+
case .smart: return "Smart"
37+
case .silent: return "Silent"
38+
case .balanced: return "Bal"
39+
case .performance: return "Perf"
40+
case .max: return "Max"
41+
case .manual: return "Manual"
42+
case .custom: return "Custom"
43+
case .automatic: return "System"
4444
}
4545
}
4646

@@ -199,8 +199,8 @@ final class FanController: ObservableObject {
199199
@Published var manualSpeed: Int = 2200
200200
@Published var autoAggressiveness: Double = 1.5
201201
@Published var autoMaxSpeed: Int = 6500
202-
@Published var statusMessage: String = "Idle"
203-
@Published var calibrationStatus: String = "No fan probe run yet."
202+
@Published var statusMessage: String = "Ready"
203+
@Published var calibrationStatus: String = "Fan key scan has not been run."
204204
@Published var isCalibrating: Bool = false
205205
@Published var customPresetSource: String = FanController.defaultCustomPresetSource
206206
@Published var customPresetStatus: String = "No custom preset saved yet."
@@ -376,7 +376,7 @@ final class FanController: ObservableObject {
376376
process.executableURL = URL(fileURLWithPath: "/usr/bin/open")
377377
process.arguments = [bundlePath]
378378
try process.run()
379-
statusMessage = "Restarting Core Monitor to apply the custom preset…"
379+
statusMessage = "Restarting Core-Monitor to apply the custom preset…"
380380

381381
for window in NSApp.windows {
382382
if let attachedSheet = window.attachedSheet {
@@ -415,7 +415,7 @@ final class FanController: ObservableObject {
415415
allSuccess = false
416416
}
417417
}
418-
statusMessage = allSuccess ? "System automatic control restored" : "Failed to restore automatic control"
418+
statusMessage = allSuccess ? "Automatic fan control restored" : "Could not restore automatic fan control"
419419
}
420420

421421
func calibrateFanControl() {
@@ -427,7 +427,7 @@ final class FanController: ObservableObject {
427427

428428
let keys = fanCalibrationCandidateKeys()
429429
isCalibrating = true
430-
calibrationStatus = "Probing fan-related SMC keys 0/\(keys.count)"
430+
calibrationStatus = "Scanning fan-related SMC keys 0/\(keys.count)"
431431

432432
Task { @MainActor [weak self] in
433433
guard let self else { return }
@@ -439,16 +439,16 @@ final class FanController: ObservableObject {
439439
}
440440

441441
let completed = index + 1
442-
calibrationStatus = "Probing fan-related SMC keys \(completed)/\(keys.count) - \(responsiveKeys.count) responsive"
442+
calibrationStatus = "Scanning fan-related SMC keys \(completed)/\(keys.count). \(responsiveKeys.count) responding."
443443
if completed % 8 == 0 {
444444
await Task.yield()
445445
}
446446
}
447447

448448
let preview = responsiveKeys.prefix(10).joined(separator: ", ")
449449
calibrationStatus = responsiveKeys.isEmpty
450-
? "Fan key probe finished: 0/\(keys.count) keys responded"
451-
: "Fan key probe finished: \(responsiveKeys.count)/\(keys.count) keys responded - \(preview)"
450+
? "Fan key scan complete. 0 of \(keys.count) keys responded."
451+
: "Fan key scan complete. \(responsiveKeys.count) of \(keys.count) keys responded: \(preview)"
452452
statusMessage = calibrationStatus
453453
isCalibrating = false
454454
}
@@ -489,7 +489,7 @@ final class FanController: ObservableObject {
489489
switch mode {
490490
case .automatic:
491491
resetToSystemAutomatic()
492-
statusMessage = "System automatic control restored"
492+
statusMessage = "Automatic fan control restored"
493493
case .manual:
494494
applyFanSpeed(manualSpeed)
495495
lastAppliedSpeed = manualSpeed
@@ -519,7 +519,7 @@ final class FanController: ObservableObject {
519519
resetToSystemAutomatic()
520520
lastAppliedSpeed = -1
521521
}
522-
statusMessage = "Silent: system automatic"
522+
statusMessage = "Silent: system managed"
523523

524524
case .balanced:
525525
applyFixedPercentProfile(0.60, label: "Balanced")
@@ -716,7 +716,7 @@ final class FanController: ObservableObject {
716716
if allSuccess {
717717
statusMessage = successMessage ?? "Applied fan speeds"
718718
} else {
719-
statusMessage = "Failed to apply fan speed"
719+
statusMessage = "Could not apply fan speed"
720720
}
721721

722722
return allSuccess
@@ -765,9 +765,9 @@ final class FanController: ObservableObject {
765765

766766
private func helperUnavailableMessage() -> String {
767767
if let monitor = systemMonitor, !monitor.hasSMCAccess {
768-
return helperManager.statusMessage ?? monitor.lastError ?? "SMC access unavailable."
768+
return helperManager.statusMessage ?? monitor.lastError ?? "SMC access is unavailable."
769769
}
770-
return helperManager.statusMessage ?? "No fan detected"
770+
return helperManager.statusMessage ?? "No fans detected."
771771
}
772772

773773
private func fanCalibrationCandidateKeys() -> [String] {

0 commit comments

Comments
 (0)