Skip to content

Free, open-source macOS cleaner. CleanMyMac alternative with zero telemetry. Native SwiftUI, scheduled auto-cleaning, Xcode/Homebrew/system cache cleanup. MIT licensed.

Show app CPU and memory usage on demand

BinaryBearsLLCe8dd317b694b
diff --git a/PureMac.xcodeproj/project.pbxproj b/PureMac.xcodeproj/project.pbxproj
index 1952ee3..930b297 100644
--- a/PureMac.xcodeproj/project.pbxproj
+++ b/PureMac.xcodeproj/project.pbxproj
@@ -12,8 +12,10 @@
0CC9A41781D1B1883279693E /* ProtectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F270D47D1DD94D4577482B90 /* ProtectionView.swift */; };
10959A68B277AEF7D2442C48 /* StorageExplorerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78B8E84105970F69BBAB638F /* StorageExplorerTests.swift */; };
1B0D043102FDB245312A5147 /* AppFilesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798B80977D14647A5691B0A0 /* AppFilesView.swift */; };
+ 20E0D6D821D0D1BFAC82E6E4 /* MonitoringLifecycleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0621A14395DCA19EC2995842 /* MonitoringLifecycleTests.swift */; };
2253F11BDF561B617439C96B /* FullDiskAccessManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E866A1541D289C69144A5E62 /* FullDiskAccessManager.swift */; };
25E2304A3FF257F1740E304B /* FileProtection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7953B398E47A4C603DE287F1 /* FileProtection.swift */; };
+ 27673871ECFD189E98548956 /* UpdateServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90D25BB11E61105B8764009E /* UpdateServiceTests.swift */; };
27F449EDD1B082FE11FEC9DF /* SchedulerService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28181F034530331A550C6A3D /* SchedulerService.swift */; };
2BCDC53C5E3AB58442C8E4B0 /* CleaningEngineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22B679C0120F1E3DDCB27FE2 /* CleaningEngineTests.swift */; };
340E424F759ACCDE7372F99F /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5ADDC35F31E40780FB5D017 /* Theme.swift */; };
@@ -36,6 +38,7 @@
6BCC5E3773DF2E9189F75A6B /* CleanupReviewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6116C5E9B68F439F6B2E42E5 /* CleanupReviewTests.swift */; };
6D36632DFF74F26035204CE2 /* PerformanceInspectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F28E28FB7B2D9E39E5F70 /* PerformanceInspectorTests.swift */; };
6D449325D54B9850FC6C119F /* UniversalBinaryScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95EC878D25C244BF94D0094C /* UniversalBinaryScanner.swift */; };
+ 6E296DC4405F5912A76EFF68 /* ProcessResourcesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F804C73B6DD4F8619B25B5 /* ProcessResourcesView.swift */; };
6E72022A661CBB41331A442C /* PermissionCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DCBD97CC88D77AE8DB01A4 /* PermissionCoordinator.swift */; };
74175B10C464D245E99BA6DB /* DuplicateFinderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1343918E4CD9C8DA99EFA588 /* DuplicateFinderView.swift */; };
75B5F0401D37F2872B1AD85A /* AppListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60E6BC61614B27C065BB18C9 /* AppListView.swift */; };
@@ -55,10 +58,12 @@
9E87638A3F12C12D93995DA7 /* LanguageFilesScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0899FE169D270DF95334905 /* LanguageFilesScanner.swift */; };
A2AE68CC75CB72D6B10CBDF5 /* DashboardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F661A0F64CF93E482CB1728F /* DashboardView.swift */; };
A549D8A39A9E5E70D91B90A6 /* Haptics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40A3F22FCEF534DE4A2CAD0E /* Haptics.swift */; };
+ A764E7BA0691861D984DEA2E /* ProcessResourceMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE52AA3D827BF3A574DC5822 /* ProcessResourceMonitor.swift */; };
A9C3A1F643C26930F442E729 /* OrphanSafetyPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AE790496C936424EF98320A /* OrphanSafetyPolicy.swift */; };
AA25686857BF1CB9250FC0E8 /* SimilarPhotoFinderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4144A1B8F1D52D44A6E8E726 /* SimilarPhotoFinderTests.swift */; };
ABDDD4F35102A39CC1A2C325 /* ConfettiView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0599AA604B0D6BA4F957537 /* ConfettiView.swift */; };
ABE3B80279483DB90B8EC1BC /* ThemeManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CE234DB2DB54ED53A4EFD6 /* ThemeManagerTests.swift */; };
+ AEDB402C9D33C3ED6D5B61FE /* ProcessResourceMonitorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BBCB7D8C9A325A7FFEEF391 /* ProcessResourceMonitorTests.swift */; };
B51E5A95BB49A6C0F5273E21 /* FileSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE522B406791BCE905BC55B /* FileSize.swift */; };
B52938BBD11842631314543D /* CategoryDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B0AF194677EAC1D5568785 /* CategoryDetailView.swift */; };
B69BD60D8AB7EBB9F80C9965 /* CleanupExclusionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C167DFBCD14DC84725EF15F /* CleanupExclusionsTests.swift */; };
@@ -83,6 +88,7 @@
E60B0A2C5D0A6CAE35BF4DFB /* Locations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77D3D9A9BC52839E6D0A22BC /* Locations.swift */; };
E69ECB1F931950E9DE5BE251 /* PerformanceInspector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C8619CA3ECD70CBBC96475C /* PerformanceInspector.swift */; };
E726702EABBE56155861DBA9 /* AppLanguage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82BB0904726B38DEB141BECA /* AppLanguage.swift */; };
+ E92B2068E8D0A381A2F10D72 /* AppUpdateSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 312E528C94C7302138EFA9DE /* AppUpdateSettingsView.swift */; };
EDEF28CAD23E936FBED1783B /* PureMacApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63581B70F9B10231964E3602 /* PureMacApp.swift */; };
F1F506C146E17D6CEC4A12F3 /* AppInfoFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23486A54A82EE3865B784D1C /* AppInfoFetcher.swift */; };
F2FA881A4B2209CC2A6342FB /* CLI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01B2C5F66B6D812572BD4F05 /* CLI.swift */; };
@@ -90,8 +96,6 @@
FBEE9208E222616A8DF1FE75 /* ProviderPaths.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AFB912A9A6CFDCB972E978F /* ProviderPaths.swift */; };
FDA30FE6349CA01C8D859F04 /* OrphanListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B71E8F62DB76D85F41F9A2E9 /* OrphanListView.swift */; };
FF6B92CAF96A58625A56A1C0 /* ProtectionAudit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9B44A9C1B4065126789622 /* ProtectionAudit.swift */; };
- 726848F8F1CA1E1829107904 /* UpdateServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E132B636229ED538463A35E /* UpdateServiceTests.swift */; };
- C9A572DBF932E601574B64E6 /* AppUpdateSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 583DCE8B0BCE0F50893B6734 /* AppUpdateSettingsView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -109,6 +113,7 @@
022D0EAEE2B6E54069FC2CBE /* UpdateService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateService.swift; sourceTree = "<group>"; };
02E502E2B5C6AECC76E5CFEF /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = "<group>"; };
043F28E28FB7B2D9E39E5F70 /* PerformanceInspectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PerformanceInspectorTests.swift; sourceTree = "<group>"; };
+ 0621A14395DCA19EC2995842 /* MonitoringLifecycleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonitoringLifecycleTests.swift; sourceTree = "<group>"; };
069AAE87E3F9EDE5593AD8B3 /* PermissionSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionSheet.swift; sourceTree = "<group>"; };
089D484A0482787027665936 /* DuplicateFinder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DuplicateFinder.swift; sourceTree = "<group>"; };
08C60E04A0CA3F227816DB63 /* DashboardCharts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardCharts.swift; sourceTree = "<group>"; };
@@ -130,10 +135,12 @@
2A8DE5D45BA19E2670B57DC5 /* CleaningEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CleaningEngine.swift; sourceTree = "<group>"; };
2D3F9FEDC493A8E49E910F67 /* AppBundleDragHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppBundleDragHandle.swift; sourceTree = "<group>"; };
311078221878708524283765 /* PureMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PureMac.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 312E528C94C7302138EFA9DE /* AppUpdateSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppUpdateSettingsView.swift; sourceTree = "<group>"; };
340D303C60FF878B019056B6 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
3667D46D8E2004EB4D73835A /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
374A3BE46E71E54B6927E9EF /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/ServicesMenu.strings; sourceTree = "<group>"; };
3A8D39C3C250F26302EC45AB /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
+ 3BBCB7D8C9A325A7FFEEF391 /* ProcessResourceMonitorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProcessResourceMonitorTests.swift; sourceTree = "<group>"; };
3D4FD34378988D430A582ED0 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = "<group>"; };
40A3F22FCEF534DE4A2CAD0E /* Haptics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Haptics.swift; sourceTree = "<group>"; };
40CD4855FB5FA866CAA52C10 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -141,6 +148,7 @@
424F7B28624C271620E13BBC /* EmptyStateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyStateView.swift; sourceTree = "<group>"; };
44392E486177839BA978685E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/ServicesMenu.strings; sourceTree = "<group>"; };
46660271CFF167AB0FE7371D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+ 48F804C73B6DD4F8619B25B5 /* ProcessResourcesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProcessResourcesView.swift; sourceTree = "<group>"; };
491771F923C93FD61A263893 /* AppLanguagePreferencesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLanguagePreferencesTests.swift; sourceTree = "<group>"; };
4AE790496C936424EF98320A /* OrphanSafetyPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrphanSafetyPolicy.swift; sourceTree = "<group>"; };
4C167DFBCD14DC84725EF15F /* CleanupExclusionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CleanupExclusionsTests.swift; sourceTree = "<group>"; };
@@ -172,6 +180,7 @@
8CF68B6BB9ED70387DF56728 /* StorageExplorer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageExplorer.swift; sourceTree = "<group>"; };
8D5E63D733D1A3BDEDF4DCA5 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
8F97E4CB93302BFE911DB1FF /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 90D25BB11E61105B8764009E /* UpdateServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateServiceTests.swift; sourceTree = "<group>"; };
913E3064AA9BD7BE94A315CF /* MenuBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarController.swift; sourceTree = "<group>"; };
92259B3E9F4468865F15DEEC /* AppearancePill.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearancePill.swift; sourceTree = "<group>"; };
95EC878D25C244BF94D0094C /* UniversalBinaryScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UniversalBinaryScanner.swift; sourceTree = "<group>"; };
@@ -212,8 +221,7 @@
F661A0F64CF93E482CB1728F /* DashboardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardView.swift; sourceTree = "<group>"; };
F77B9D7D5353CD42BD03ADBB /* ApplicationUpdaterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationUpdaterTests.swift; sourceTree = "<group>"; };
F9DCBD97CC88D77AE8DB01A4 /* PermissionCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionCoordinator.swift; sourceTree = "<group>"; };
- 6E132B636229ED538463A35E /* UpdateServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateServiceTests.swift; sourceTree = "<group>"; };
- 583DCE8B0BCE0F50893B6734 /* AppUpdateSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppUpdateSettingsView.swift; sourceTree = "<group>"; };
+ FE52AA3D827BF3A574DC5822 /* ProcessResourceMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProcessResourceMonitor.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -240,7 +248,6 @@
261FB8D961FEC76F15EA523A /* PureMacTests */ = {
isa = PBXGroup;
children = (
- 6E132B636229ED538463A35E /* UpdateServiceTests.swift */,
491771F923C93FD61A263893 /* AppLanguagePreferencesTests.swift */,
F77B9D7D5353CD42BD03ADBB /* ApplicationUpdaterTests.swift */,
752603285F7DBBA12BB3AA91 /* AppStateTests.swift */,
@@ -249,13 +256,16 @@
6116C5E9B68F439F6B2E42E5 /* CleanupReviewTests.swift */,
D379BB1C513985CF9AB783D5 /* DuplicateFinderTests.swift */,
155CE1B8CDCCCA6F9FD028C1 /* LocalizationFilesTests.swift */,
+ 0621A14395DCA19EC2995842 /* MonitoringLifecycleTests.swift */,
A5984F53676A523D97AF2A89 /* NodeCachePathTests.swift */,
043F28E28FB7B2D9E39E5F70 /* PerformanceInspectorTests.swift */,
+ 3BBCB7D8C9A325A7FFEEF391 /* ProcessResourceMonitorTests.swift */,
853B6D91596DB63ACE660F74 /* ProtectionAuditTests.swift */,
4144A1B8F1D52D44A6E8E726 /* SimilarPhotoFinderTests.swift */,
C7D81BE7EA5DB17F4A0300AD /* SimulatorRuntimeSupportTests.swift */,
78B8E84105970F69BBAB638F /* StorageExplorerTests.swift */,
55CE234DB2DB54ED53A4EFD6 /* ThemeManagerTests.swift */,
+ 90D25BB11E61105B8764009E /* UpdateServiceTests.swift */,
);
path = PureMacTests;
sourceTree = "<group>";
@@ -277,6 +287,7 @@
5A0AF1B9C42A20B6C9FC2DD9 /* AppUpdatesView.swift */,
1343918E4CD9C8DA99EFA588 /* DuplicateFinderView.swift */,
D84FB753A60BE6BF54D5126A /* PerformanceView.swift */,
+ 48F804C73B6DD4F8619B25B5 /* ProcessResourcesView.swift */,
F270D47D1DD94D4577482B90 /* ProtectionView.swift */,
F3C3342D6386FBB6DE3D18BC /* SimilarPhotosView.swift */,
5EB777A06A7BFD324FFABB83 /* SpaceExplorerView.swift */,
@@ -322,6 +333,7 @@
913E3064AA9BD7BE94A315CF /* MenuBarController.swift */,
5C8619CA3ECD70CBBC96475C /* PerformanceInspector.swift */,
F9DCBD97CC88D77AE8DB01A4 /* PermissionCoordinator.swift */,
+ FE52AA3D827BF3A574DC5822 /* ProcessResourceMonitor.swift */,
6F9B44A9C1B4065126789622 /* ProtectionAudit.swift */,
A711CDF5285F68775D9B5513 /* ScanEngine.swift */,
28181F034530331A550C6A3D /* SchedulerService.swift */,
@@ -336,7 +348,7 @@
7BC68AB045DA6E5299FD3CB6 /* Settings */ = {
isa = PBXGroup;
children = (
- 583DCE8B0BCE0F50893B6734 /* AppUpdateSettingsView.swift */,
+ 312E528C94C7302138EFA9DE /* AppUpdateSettingsView.swift */,
3A8D39C3C250F26302EC45AB /* SettingsView.swift */,
);
path = Settings;
@@ -571,7 +583,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- C9A572DBF932E601574B64E6 /* AppUpdateSettingsView.swift in Sources */,
DC32253D26D0E29762006DA0 /* AppBundleDragHandle.swift in Sources */,
4F754D89F4CE5142BE384062 /* AppConstants.swift in Sources */,
1B0D043102FDB245312A5147 /* AppFilesView.swift in Sources */,
@@ -581,6 +592,7 @@
9BB5AAA574AFED6C27A3F8E2 /* AppPathFinder.swift in Sources */,
9AA80E035DF7B33F6EE118DF /* AppState.swift in Sources */,
535B23C0108C06475215B8E8 /* AppTheme.swift in Sources */,
+ E92B2068E8D0A381A2F10D72 /* AppUpdateSettingsView.swift in Sources */,
C85B54037A5989A85968F328 /* AppUpdatesView.swift in Sources */,
95278ABDCF5F4D6AC60503B1 /* AppearancePill.swift in Sources */,
0BB6BC2EAFB02407FBC6CDA6 /* ApplicationUpdater.swift in Sources */,
@@ -616,6 +628,8 @@
5882104828B9C5A5E06B2AFB /* PerformanceView.swift in Sources */,
6E72022A661CBB41331A442C /* PermissionCoordinator.swift in Sources */,
61D285E96DED76FDCD54570F /* PermissionSheet.swift in Sources */,
+ A764E7BA0691861D984DEA2E /* ProcessResourceMonitor.swift in Sources */,
+ 6E296DC4405F5912A76EFF68 /* ProcessResourcesView.swift in Sources */,
FF6B92CAF96A58625A56A1C0 /* ProtectionAudit.swift in Sources */,
0CC9A41781D1B1883279693E /* ProtectionView.swift in Sources */,
FBEE9208E222616A8DF1FE75 /* ProviderPaths.swift in Sources */,
@@ -642,7 +656,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 726848F8F1CA1E1829107904 /* UpdateServiceTests.swift in Sources */,
59B3096E2AE8ED0397B16798 /* AppLanguagePreferencesTests.swift in Sources */,
E2403D82F00D749C9AD4A6D4 /* AppStateTests.swift in Sources */,
D15B7A053D69D4348D9DCD88 /* ApplicationUpdaterTests.swift in Sources */,
@@ -651,13 +664,16 @@
6BCC5E3773DF2E9189F75A6B /* CleanupReviewTests.swift in Sources */,
4FAAA6E9887181C4C0AA9F87 /* DuplicateFinderTests.swift in Sources */,
CFA64F54CDBF8A4765E0068D /* LocalizationFilesTests.swift in Sources */,
+ 20E0D6D821D0D1BFAC82E6E4 /* MonitoringLifecycleTests.swift in Sources */,
E4145581C55556DB43725FBB /* NodeCachePathTests.swift in Sources */,
6D36632DFF74F26035204CE2 /* PerformanceInspectorTests.swift in Sources */,
+ AEDB402C9D33C3ED6D5B61FE /* ProcessResourceMonitorTests.swift in Sources */,
94EA77AE33FBB24655EC19C5 /* ProtectionAuditTests.swift in Sources */,
AA25686857BF1CB9250FC0E8 /* SimilarPhotoFinderTests.swift in Sources */,
F4F02F966001A1504C2B4D33 /* SimulatorRuntimeSupportTests.swift in Sources */,
10959A68B277AEF7D2442C48 /* StorageExplorerTests.swift in Sources */,
ABE3B80279483DB90B8EC1BC /* ThemeManagerTests.swift in Sources */,
+ 27673871ECFD189E98548956 /* UpdateServiceTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/PureMac/Services/MenuBarController.swift b/PureMac/Services/MenuBarController.swift
index ca676f4..ab70978 100644
--- a/PureMac/Services/MenuBarController.swift
+++ b/PureMac/Services/MenuBarController.swift
@@ -34,6 +34,7 @@ final class MenuBarController: NSObject, NSPopoverDelegate {
private let statusItem: NSStatusItem
private let popover = NSPopover()
private let monitor = SystemMonitor.shared
+ private let monitorOwner = UUID()
private var cancellable: AnyCancellable?
override init() {
@@ -45,7 +46,7 @@ final class MenuBarController: NSObject, NSPopoverDelegate {
statusItem.autosaveName = "PureMacSystemMonitor"
statusItem.isVisible = true
- monitor.start()
+ monitor.start(owner: monitorOwner)
if let button = statusItem.button {
button.image = NSImage(
@@ -77,7 +78,7 @@ final class MenuBarController: NSObject, NSPopoverDelegate {
cancellable = nil
if popover.isShown { popover.performClose(nil) }
NSStatusBar.system.removeStatusItem(statusItem)
- monitor.stop()
+ monitor.stop(owner: monitorOwner)
}
private func updateTitle() {
diff --git a/PureMac/Services/ProcessResourceMonitor.swift b/PureMac/Services/ProcessResourceMonitor.swift
new file mode 100644
index 0000000..53cd939
--- /dev/null
+++ b/PureMac/Services/ProcessResourceMonitor.swift
@@ -0,0 +1,239 @@
+import AppKit
+import Darwin
+import Foundation
+
+struct ProcessResourceConsumer: Identifiable, Sendable {
+ let id: String
+ var name: String
+ let applicationPath: String?
+ var cpuFraction: Double?
+ var residentBytes: UInt64
+ var processCount: Int
+}
+
+enum ProcessResourceSort: String, CaseIterable, Identifiable {
+ case cpu, memory
+ var id: Self { self }
+}
+
+/// Includes the kernel start time so a recycled PID never inherits CPU counters.
+struct ProcessResourceReading: Sendable {
+ let pid: Int32
+ let startSeconds: UInt64
+ let startMicroseconds: UInt64
+ let executablePath: String
+ let name: String
+ let cpuTicks: UInt64
+ let residentBytes: UInt64
+ let sampledAt: UInt64
+
+ var identity: String { "\(pid):\(startSeconds):\(startMicroseconds)" }
+}
+
+enum ProcessResourceMath {
+ /// The first bundle owns nested helpers, XPC services and embedded apps.
+ static func applicationPath(for executablePath: String) -> String? {
+ guard executablePath.hasPrefix("/") else { return nil }
+ let components = (executablePath as NSString).pathComponents
+ guard let index = components.firstIndex(where: { $0.lowercased().hasSuffix(".app") }) else {
+ return nil
+ }
+ return NSString.path(withComponents: Array(components.prefix(through: index)))
+ }
+
+ static func cpuFraction(current: ProcessResourceReading, previous: ProcessResourceReading?, processorCount: Int, nanosecondsPerTick: Double = 1) -> Double? {
+ guard let previous, previous.identity == current.identity,
+ previous.executablePath == current.executablePath,
+ current.sampledAt > previous.sampledAt,
+ current.cpuTicks >= previous.cpuTicks,
+ processorCount > 0, nanosecondsPerTick.isFinite, nanosecondsPerTick > 0 else { return nil }
+ let elapsed = Double(current.sampledAt - previous.sampledAt)
+ let cpu = Double(current.cpuTicks - previous.cpuTicks) * nanosecondsPerTick
+ return min(1, max(0, cpu / elapsed / Double(processorCount)))
+ }
+
+ static func consumers(readings: [ProcessResourceReading], previous: [String: ProcessResourceReading], processorCount: Int, nanosecondsPerTick: Double = 1) -> [ProcessResourceConsumer] {
+ var groups: [String: ProcessResourceConsumer] = [:]
+ for reading in readings {
+ let application = applicationPath(for: reading.executablePath)
+ // Unknown executable paths remain separate; similarly named processes
+ // must not be attributed to an application without evidence.
+ let id = application.map { "app:\($0)" }
+ ?? (reading.executablePath.isEmpty ? "pid:\(reading.identity)" : "exe:\(reading.executablePath)")
+ let cpu = cpuFraction(current: reading, previous: previous[reading.identity], processorCount: processorCount, nanosecondsPerTick: nanosecondsPerTick)
+ if var group = groups[id] {
+ group.residentBytes = group.residentBytes.addingReportingOverflow(reading.residentBytes).overflow
+ ? UInt64.max : group.residentBytes + reading.residentBytes
+ group.processCount += 1
+ // Any unknown member means this group's first interval is incomplete.
+ if let total = group.cpuFraction, let cpu {
+ group.cpuFraction = min(1, total + cpu)
+ } else {
+ group.cpuFraction = nil
+ }
+ groups[id] = group
+ } else {
+ let name = application.map { URL(fileURLWithPath: $0).deletingPathExtension().lastPathComponent }
+ ?? reading.name
+ groups[id] = ProcessResourceConsumer(id: id, name: name, applicationPath: application,
+ cpuFraction: cpu, residentBytes: reading.residentBytes, processCount: 1)
+ }
+ }
+ return Array(groups.values)
+ }
+
+ static func sorted(_ consumers: [ProcessResourceConsumer], by sort: ProcessResourceSort, search: String = "") -> [ProcessResourceConsumer] {
+ let query = search.trimmingCharacters(in: .whitespacesAndNewlines)
+ return consumers.filter { query.isEmpty || $0.name.localizedStandardContains(query) }.sorted {
+ switch sort {
+ case .cpu:
+ if $0.cpuFraction != $1.cpuFraction { return ($0.cpuFraction ?? -1) > ($1.cpuFraction ?? -1) }
+ if $0.residentBytes != $1.residentBytes { return $0.residentBytes > $1.residentBytes }
+ case .memory:
+ if $0.residentBytes != $1.residentBytes { return $0.residentBytes > $1.residentBytes }
+ }
+ let comparison = $0.name.localizedStandardCompare($1.name)
+ return comparison == .orderedSame ? $0.id < $1.id : comparison == .orderedAscending
+ }
+ }
+}
+
+private struct ProcessResourceSample: Sendable {
+ let consumers: [ProcessResourceConsumer]
+ let unavailableProcessCount: Int
+ let failed: Bool
+ let warmingUp: Bool
+}
+
+/// A serial actor keeps all libproc calls and counter bookkeeping off the UI
+/// thread. No subprocess, elevated privileges or process-control APIs are used.
+private actor ProcessResourceSampler {
+ private var previous: [String: ProcessResourceReading] = [:]
+ // XNU fill_taskprocinfo returns Mach absolute ticks, not nanoseconds:
+ // https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/kern/bsd_kern.c
+ private let nanosecondsPerTick: Double = {
+ var timebase = mach_timebase_info_data_t()
+ guard mach_timebase_info(&timebase) == KERN_SUCCESS, timebase.denom > 0 else { return .nan }
+ return Double(timebase.numer) / Double(timebase.denom)
+ }()
+
+ func sample() -> ProcessResourceSample {
+ let estimate = proc_listallpids(nil, 0)
+ guard estimate > 0 else {
+ previous.removeAll()
+ return ProcessResourceSample(consumers: [], unavailableProcessCount: 0, failed: true, warmingUp: true)
+ }
+ // Headroom accommodates processes created between enumeration calls.
+ var pids = [Int32](repeating: 0, count: Int(estimate) + 256)
+ let capacityBytes = Int32(pids.count * MemoryLayout<Int32>.stride)
+ let count = pids.withUnsafeMutableBytes { proc_listallpids($0.baseAddress, capacityBytes) }
+ guard count > 0 else {
+ previous.removeAll()
+ return ProcessResourceSample(consumers: [], unavailableProcessCount: 0, failed: true, warmingUp: true)
+ }
+ var readings: [ProcessResourceReading] = []
+ var unavailable = Int(count) >= pids.count ? 1 : 0
+ for pid in pids.prefix(min(Int(count), pids.count)) where pid > 0 {
+ if Task.isCancelled { break }
+ var info = proc_taskallinfo()
+ let size = Int32(MemoryLayout<proc_taskallinfo>.stride)
+ errno = 0
+ guard proc_pidinfo(pid, PROC_PIDTASKALLINFO, 0, &info, size) == size else {
+ // An exited process is normal churn, not a permission failure.
+ if errno != ESRCH { unavailable += 1 }
+ continue
+ }
+ // Re-read the path: exec can change the executable without changing
+ // the PID or kernel start time. This also avoids stale app attribution.
+ var buffer = [CChar](repeating: 0, count: 4 * Int(MAXPATHLEN))
+ let bytes = buffer.withUnsafeMutableBytes { proc_pidpath(pid, $0.baseAddress, UInt32($0.count)) }
+ let path = bytes > 0 ? String(cString: buffer) : ""
+ let kernelName = withUnsafeBytes(of: info.pbsd.pbi_name) { bytes in
+ String(decoding: bytes.prefix(while: { $0 != 0 }), as: UTF8.self)
+ }
+ let name = path.isEmpty ? (kernelName.isEmpty ? "PID \(pid)" : kernelName) : URL(fileURLWithPath: path).lastPathComponent
+ readings.append(ProcessResourceReading(pid: pid, startSeconds: info.pbsd.pbi_start_tvsec,
+ startMicroseconds: info.pbsd.pbi_start_tvusec, executablePath: path, name: name,
+ cpuTicks: info.ptinfo.pti_total_user &+ info.ptinfo.pti_total_system,
+ residentBytes: info.ptinfo.pti_resident_size, sampledAt: DispatchTime.now().uptimeNanoseconds))
+ }
+ let warmingUp = previous.isEmpty
+ let consumers = ProcessResourceMath.consumers(readings: readings, previous: previous,
+ processorCount: ProcessInfo.processInfo.activeProcessorCount,
+ nanosecondsPerTick: nanosecondsPerTick)
+ previous = Dictionary(uniqueKeysWithValues: readings.map { ($0.identity, $0) })
+ return ProcessResourceSample(consumers: consumers, unavailableProcessCount: unavailable,
+ failed: readings.isEmpty, warmingUp: warmingUp)
+ }
+}
+
+@MainActor
+final class ProcessResourceMonitor: ObservableObject {
+ @Published private(set) var consumers: [ProcessResourceConsumer] = []
+ @Published private(set) var unavailableProcessCount = 0
+ @Published private(set) var isWarmingUp = true
+ @Published private(set) var isSampling = false
+ @Published private(set) var samplingFailed = false
+ private var samplingTask: Task<Void, Never>?
+ private var icons: [String: NSImage] = [:]
+ private var names: [String: String] = [:]
+
+ func icon(for consumer: ProcessResourceConsumer) -> NSImage? {
+ consumer.applicationPath.flatMap { icons[$0] }
+ }
+
+ func setActive(_ active: Bool) {
+ guard active != isSampling else { return }
+ isSampling = active
+ samplingTask?.cancel()
+ samplingTask = nil
+ consumers = []
+ icons.removeAll()
+ names.removeAll()
+ unavailableProcessCount = 0
+ isWarmingUp = true
+ samplingFailed = false
+ guard active else { return }
+ // Session-scoped sampler releases its counters when cancelled. A rapid
+ // hide/show cannot reset the next session's baseline from an old task.
+ let sampler = ProcessResourceSampler()
+ samplingTask = Task { [weak self, sampler] in
+ while !Task.isCancelled {
+ let sample = await sampler.sample()
+ guard !Task.isCancelled, self != nil else { return }
+ self?.apply(sample)
+ do { try await Task.sleep(nanoseconds: 2_000_000_000) }
+ catch { return }
+ }
+ }
+ }
+
+ private func apply(_ sample: ProcessResourceSample) {
+ let runningNames = NSWorkspace.shared.runningApplications.reduce(into: [String: String]()) { result, app in
+ if let path = app.bundleURL?.path, let name = app.localizedName { result[path] = name }
+ }
+ let activePaths = Set(sample.consumers.compactMap(\.applicationPath))
+ icons = icons.filter { activePaths.contains($0.key) }
+ names = names.filter { activePaths.contains($0.key) }
+ consumers = sample.consumers.map { consumer in
+ var consumer = consumer
+ if let path = consumer.applicationPath {
+ if icons[path] == nil { icons[path] = NSWorkspace.shared.icon(forFile: path) }
+ if let name = runningNames[path] { names[path] = name }
+ if names[path] == nil {
+ let displayName = FileManager.default.displayName(atPath: path)
+ names[path] = displayName.lowercased().hasSuffix(".app") ? String(displayName.dropLast(4)) : displayName
+ // Keep the path-derived fallback if Finder has no localized name.
+ if names[path]?.isEmpty != false { names[path] = consumer.name }
+ }
+ consumer.name = names[path] ?? consumer.name
+ }
+ return consumer
+ }
+ unavailableProcessCount = sample.unavailableProcessCount
+ samplingFailed = sample.failed
+ isWarmingUp = sample.warmingUp
+ }
+
+ deinit { samplingTask?.cancel() }
+}
diff --git a/PureMac/Services/SystemMonitor.swift b/PureMac/Services/SystemMonitor.swift
index 82810cf..d90da1e 100644
--- a/PureMac/Services/SystemMonitor.swift
+++ b/PureMac/Services/SystemMonitor.swift
@@ -2,10 +2,9 @@ import Foundation
import Darwin
/// Lightweight live system telemetry for the menu-bar monitor (CPU / memory /
-/// disk). Polls on a timer only while a SwiftUI view is observing it; the menu
-/// bar's `MenuBarExtra` keeps a single shared instance alive, and `start()` /
-/// `stop()` gate the timer so the app does no background sampling when the
-/// monitor is disabled in Settings.
+/// disk). Each visible consumer owns a sampling request. The fastest request
+/// determines the interval; releasing the last request stops sampling. The
+/// enabled menu-bar monitor can continue independently of the Performance page.
///
/// All readings use public Mach / Foundation APIs (no sandbox-incompatible
/// shelling out), so this stays valid under the app's hardened-runtime,
@@ -36,40 +35,69 @@ final class SystemMonitor: ObservableObject {
/// increasing totals into a per-interval delta.
private var previousBusy: UInt64 = 0
private var previousTotal: UInt64 = 0
- /// Number of live observers; the timer runs only while > 0 so two views
- /// (menu-bar label + dropdown) share one timer and the app idles cleanly.
- private var observerCount = 0
-
- private init() {}
-
- /// Begin (or keep) sampling. Refcounted so multiple observers share a timer.
- func start(interval: TimeInterval = 2.0) {
- observerCount += 1
- guard timer == nil else { return }
- memoryTotal = Int64(ProcessInfo.processInfo.physicalMemory)
- sample()
- let t = Timer(timeInterval: interval, repeats: true) { [weak self] _ in
- Task { @MainActor in self?.sample() }
- }
- // .common so sampling continues while a menu/popover tracks the run loop.
- RunLoop.main.add(t, forMode: .common)
- timer = t
+ // Idempotent subscriptions prevent repeated view activation from leaking a
+ // timer. Each consumer releases only its own request.
+ private var requests: [UUID: TimeInterval] = [:]
+ private var timerGeneration = UUID()
+ private let sampleAction: (() -> Void)?
+ private(set) var samplingInterval: TimeInterval?
+ var isSampling: Bool { timer != nil }
+
+ init(sampleAction: (() -> Void)? = nil) {
+ self.sampleAction = sampleAction
+ }
+
+ func start(owner: UUID, interval: TimeInterval = 2.0) {
+ requests[owner] = interval.isFinite ? max(0.1, interval) : 2
+ configureTimer()
}
- /// Release one observer; the timer stops once the last one goes away.
- func stop() {
- observerCount = max(0, observerCount - 1)
- guard observerCount == 0 else { return }
+ func stop(owner: UUID) {
+ requests.removeValue(forKey: owner)
+ configureTimer()
+ }
+
+ private func configureTimer() {
+ let interval = requests.values.min()
+ guard interval != samplingInterval else { return }
+ let wasStopped = timer == nil
timer?.invalidate()
timer = nil
+ timerGeneration = UUID()
+ samplingInterval = interval
+ guard let interval else {
+ previousBusy = 0
+ previousTotal = 0
+ return
+ }
+ if wasStopped {
+ memoryTotal = Int64(ProcessInfo.processInfo.physicalMemory)
+ cpuUsage = 0
+ sample()
+ }
+ let generation = timerGeneration
+ let timer = Timer(timeInterval: interval, repeats: true) { [weak self] _ in
+ Task { @MainActor in
+ guard let self, self.timerGeneration == generation, !self.requests.isEmpty else { return }
+ self.sample()
+ }
+ }
+ RunLoop.main.add(timer, forMode: .common)
+ self.timer = timer
}
private func sample() {
- sampleCPU()
- sampleMemory()
- sampleDisk()
+ if let sampleAction {
+ sampleAction()
+ } else {
+ sampleCPU()
+ sampleMemory()
+ sampleDisk()
+ }
}
+ deinit { timer?.invalidate() }
+
// MARK: - CPU
private func sampleCPU() {
diff --git a/PureMac/Views/Components/MenuBarMonitorView.swift b/PureMac/Views/Components/MenuBarMonitorView.swift
index 900064b..46e27e4 100644
--- a/PureMac/Views/Components/MenuBarMonitorView.swift
+++ b/PureMac/Views/Components/MenuBarMonitorView.swift
@@ -82,8 +82,8 @@ struct MenuBarMonitorView: View {
}
.padding(14)
.frame(width: 252)
- .onAppear { monitor.start() }
- .onDisappear { monitor.stop() }
+ // The owning MenuBarController keeps telemetry alive for the status
+ // item and popover together, and releases it explicitly on teardown.
}
private func byteDetail(_ used: Int64, _ total: Int64) -> String {
diff --git a/PureMac/Views/Tools/PerformanceView.swift b/PureMac/Views/Tools/PerformanceView.swift
index ed7ee43..a1b7a6d 100644
--- a/PureMac/Views/Tools/PerformanceView.swift
+++ b/PureMac/Views/Tools/PerformanceView.swift
@@ -10,8 +10,15 @@ struct PerformanceView: View {
}
@ObservedObject private var monitor = SystemMonitor.shared
- @State private var startupExpanded = false
@State private var state: LoadState = .idle
+ @State private var resourcesExpanded = false
+ @State private var monitorOwner = UUID()
+ @State private var pageIsVisible = false
+ @State private var appIsActive = NSApplication.shared.isActive
+ @State private var windowIsMinimized = false
+ @State private var windowIsKey = false
+ @Environment(\.accessibilityReduceMotion) private var reduceMotion
+ @State private var startupExpanded = false
@State private var snapshotPendingDeletion: PerformanceSnapshot?
@State private var deletingSnapshotID: String?
@State private var deletionError: String?
@@ -46,12 +53,45 @@ struct PerformanceView: View {
.help("Inspect startup items and local snapshots again")
}
}
- .task {
- monitor.start(interval: 1.5)
- await refresh()
+ .task { await refresh() }
+ .onAppear {
+ pageIsVisible = true
+ appIsActive = NSApplication.shared.isActive
+ windowIsMinimized = WindowOpener.shared.mainWindow?.isMiniaturized ?? false
+ windowIsKey = WindowOpener.shared.mainWindow?.isKeyWindow ?? false
+ synchronizeMonitoring()
}
.onDisappear {
- monitor.stop()
+ pageIsVisible = false
+ synchronizeMonitoring()
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in
+ appIsActive = true
+ synchronizeMonitoring()
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSApplication.didResignActiveNotification)) { _ in
+ appIsActive = false
+ synchronizeMonitoring()
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSWindow.didMiniaturizeNotification)) { notification in
+ guard let window = notification.object as? NSWindow, window === WindowOpener.shared.mainWindow else { return }
+ windowIsMinimized = true
+ synchronizeMonitoring()
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSWindow.didDeminiaturizeNotification)) { notification in
+ guard let window = notification.object as? NSWindow, window === WindowOpener.shared.mainWindow else { return }
+ windowIsMinimized = false
+ synchronizeMonitoring()
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSWindow.didBecomeKeyNotification)) { notification in
+ guard let window = notification.object as? NSWindow, window === WindowOpener.shared.mainWindow else { return }
+ windowIsKey = true
+ synchronizeMonitoring()
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSWindow.didResignKeyNotification)) { notification in
+ guard let window = notification.object as? NSWindow, window === WindowOpener.shared.mainWindow else { return }
+ windowIsKey = false
+ synchronizeMonitoring()
}
.alert("Delete local snapshot?", isPresented: deletionConfirmationPresented) {
Button("Cancel", role: .cancel) {
@@ -93,14 +133,45 @@ struct PerformanceView: View {
.padding(.bottom, 2)
}
+ private var resourcesAreActive: Bool {
+ pageIsVisible && appIsActive && windowIsKey && !windowIsMinimized
+ }
+
+ private func synchronizeMonitoring() {
+ if resourcesAreActive {
+ monitor.start(owner: monitorOwner, interval: 1.5)
+ } else {
+ monitor.stop(owner: monitorOwner)
+ }
+ }
+
private var liveResources: some View {
CardSurface(padding: 18, elevation: .standard, tint: Tint.accent) {
- VStack(alignment: .leading, spacing: 16) {
- HStack {
- SectionHeader("Live resources")
- Spacer()
- StatusChip(label: String(localized: "Live"), systemImage: "circle.fill", tint: Tint.green)
+ VStack(alignment: .leading, spacing: 18) {
+ Button {
+ withAnimation(reduceMotion ? nil : .easeInOut(duration: 0.2)) {
+ resourcesExpanded.toggle()
+ }
+ } label: {
+ HStack(spacing: 10) {
+ Image(systemName: "chevron.right")
+ .font(.system(size: 11, weight: .semibold))
+ .rotationEffect(.degrees(resourcesExpanded ? 90 : 0))
+ .foregroundStyle(.secondary)
+ IconTile(systemName: "cpu", tint: Tint.accent, size: 30, corner: 8)
+ Text("CPU - Memory")
+ .font(.system(size: 15, weight: .semibold))
+ Spacer()
+ StatusChip(label: resourcesAreActive ? String(localized: "Live") : String(localized: "Paused"),
+ systemImage: resourcesAreActive ? "circle.fill" : "pause.fill",
+ tint: resourcesAreActive ? Tint.green : .secondary)
+ }
+ .contentShape(Rectangle())
}
+ .buttonStyle(.plain)
+ .accessibilityLabel("CPU - Memory")
+ .accessibilityValue(Text(LocalizedStringKey(resourcesExpanded ? "Expanded" : "Collapsed")))
+ .accessibilityIdentifier("performance.resourcesDisclosure")
HStack(spacing: 26) {
ResourceMeter(
@@ -109,15 +180,17 @@ struct PerformanceView: View {
detail: "\(Int((monitor.cpuUsage * 100).rounded()))%",
tint: Tint.accent
)
- Divider()
- .frame(height: 52)
+ Divider().frame(height: 52)
ResourceMeter(
- title: "Memory pressure use",
+ title: "Memory in use",
value: monitor.memoryFraction,
detail: memoryDetail,
tint: Tint.purple
)
}
+ if resourcesExpanded {
+ ProcessResourcesView(isActive: resourcesAreActive)
+ }
}
}
}
@@ -306,7 +379,7 @@ struct PerformanceView: View {
let formatter = ByteCountFormatter()
formatter.countStyle = .memory
formatter.allowedUnits = [.useGB, .useMB]
- return String(localized: "\(formatter.string(fromByteCount: monitor.memoryUsed)) of \(formatter.string(fromByteCount: monitor.memoryTotal))")
+ return String(format: String(localized: "%@ of %@"), formatter.string(fromByteCount: monitor.memoryUsed), formatter.string(fromByteCount: monitor.memoryTotal))
}
private var deletionConfirmationPresented: Binding<Bool> {
diff --git a/PureMac/Views/Tools/ProcessResourcesView.swift b/PureMac/Views/Tools/ProcessResourcesView.swift
new file mode 100644
index 0000000..7fec748
--- /dev/null
+++ b/PureMac/Views/Tools/ProcessResourcesView.swift
@@ -0,0 +1,194 @@
+import AppKit
+import SwiftUI
+
+/// Mounted only while the resource disclosure is open. Sampling also pauses
+/// when PureMac is not the foreground application.
+struct ProcessResourcesView: View {
+ let isActive: Bool
+ @StateObject private var monitor = ProcessResourceMonitor()
+ @State private var sort: ProcessResourceSort = .cpu
+ @State private var search = ""
+ @State private var showAll = false
+ @State private var isVisible = false
+
+ var body: some View {
+ let matchingConsumers = ProcessResourceMath.sorted(monitor.consumers, by: sort, search: search)
+ let visibleConsumers = showAll || !search.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
+ ? matchingConsumers : Array(matchingConsumers.prefix(8))
+ return VStack(alignment: .leading, spacing: 12) {
+ Divider()
+ HStack(spacing: 12) {
+ Text("Apps and processes")
+ .font(.system(size: 13, weight: .semibold))
+ Spacer()
+ Picker("Sort by", selection: $sort) {
+ Text("CPU").tag(ProcessResourceSort.cpu)
+ Text("Memory").tag(ProcessResourceSort.memory)
+ }
+ .pickerStyle(.segmented)
+ .labelsHidden()
+ .frame(width: 170)
+ .accessibilityIdentifier("performance.processSort")
+ }
+
+ HStack(spacing: 8) {
+ Image(systemName: "magnifyingglass")
+ .foregroundStyle(.secondary)
+ TextField("Search apps and processes", text: $search)
+ .textFieldStyle(.plain)
+ .accessibilityIdentifier("performance.processSearch")
+ if !search.isEmpty {
+ Button { search = "" } label: {
+ Image(systemName: "xmark.circle.fill")
+ }
+ .buttonStyle(.plain)
+ .foregroundStyle(.secondary)
+ .accessibilityLabel("Clear search")
+ }
+ }
+ .padding(9)
+ .background(Color.primary.opacity(0.035), in: RoundedRectangle(cornerRadius: 8))
+
+ if !isActive {
+ Label("Live updates paused", systemImage: "pause.circle")
+ .font(.system(size: 12))
+ .foregroundStyle(.secondary)
+ } else if monitor.samplingFailed {
+ Label("Process information is unavailable. Try Activity Monitor for more detail.", systemImage: "exclamationmark.triangle")
+ .font(.system(size: 12))
+ .foregroundStyle(.secondary)
+ } else if monitor.consumers.isEmpty && monitor.isWarmingUp {
+ HStack(spacing: 9) {
+ ProgressView().controlSize(.small)
+ Text("Measuring apps and processes…")
+ .font(.system(size: 12))
+ .foregroundStyle(.secondary)
+ }
+ .padding(.vertical, 10)
+ } else if visibleConsumers.isEmpty {
+ Text("No matching apps or processes")
+ .font(.system(size: 12))
+ .foregroundStyle(.secondary)
+ .padding(.vertical, 10)
+ } else {
+ HStack {
+ Text("Name")
+ Spacer()
+ Text("CPU").frame(width: 92, alignment: .trailing)
+ Text("Memory").frame(width: 122, alignment: .trailing)
+ }
+ .font(.system(size: 10.5, weight: .medium))
+ .foregroundStyle(.secondary)
+
+ LazyVStack(spacing: 0) {
+ ForEach(visibleConsumers) { consumer in
+ ProcessResourceRow(consumer: consumer, icon: monitor.icon(for: consumer))
+ if consumer.id != visibleConsumers.last?.id {
+ Divider().padding(.leading, 40)
+ }
+ }
+ }
+
+ if matchingConsumers.count > 8 && search.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
+ Button(showAll ? String(localized: "Show top 8") : String(localized: "Show all apps and processes")) {
+ showAll.toggle()
+ }
+ .buttonStyle(.borderless)
+ .font(.system(size: 12, weight: .medium))
+ .accessibilityIdentifier("performance.showAllProcesses")
+ }
+ }
+
+ VStack(alignment: .leading, spacing: 4) {
+ if isActive && monitor.isWarmingUp && !monitor.samplingFailed {
+ Text("CPU values appear after the next sample.")
+ }
+ if monitor.unavailableProcessCount > 0 {
+ Text("Some protected or changing processes could not be measured.")
+ .foregroundStyle(Tint.orange)
+ }
+ }
+ .font(.system(size: 10.5))
+ .foregroundStyle(.secondary)
+
+ DisclosureGroup("About these readings") {
+ VStack(alignment: .leading, spacing: 5) {
+ Text("CPU uses the Mac’s total capacity. App helpers are grouped with their app.")
+ Text("App memory shows resident memory, including shared pages. App totals can differ from the summary.")
+ Text("Memory estimate includes active, wired and compressed memory.")
+ }
+ .padding(.top, 6)
+ }
+ .font(.system(size: 10.5))
+ .foregroundStyle(.secondary)
+ }
+ .onAppear {
+ isVisible = true
+ monitor.setActive(isActive)
+ }
+ .onDisappear {
+ isVisible = false
+ monitor.setActive(false)
+ }
+ .onChange(of: isActive) { active in
+ monitor.setActive(isVisible && active)
+ }
+ }
+}
+
+private struct ProcessResourceRow: View {
+ let consumer: ProcessResourceConsumer
+ let icon: NSImage?
+ private let memoryTotal = ProcessInfo.processInfo.physicalMemory
+
+ var body: some View {
+ HStack(spacing: 10) {
+ if let icon {
+ Image(nsImage: icon)
+ .resizable()
+ .scaledToFit()
+ .frame(width: 30, height: 30)
+ .accessibilityHidden(true)
+ } else {
+ IconTile(systemName: "gearshape.2", tint: .secondary, size: 30, corner: 8)
+ .accessibilityHidden(true)
+ }
+ VStack(alignment: .leading, spacing: 3) {
+ Text(consumer.name)
+ .font(.system(size: 12.5, weight: .medium))
+ .lineLimit(1)
+ .truncationMode(.middle)
+ Group {
+ if consumer.processCount == 1 {
+ Text("1 process")
+ } else {
+ Text("\(consumer.processCount) processes")
+ }
+ }
+ .font(.system(size: 10))
+ .foregroundStyle(.secondary)
+ }
+ .help(consumer.applicationPath ?? consumer.name)
+ Spacer(minLength: 8)
+ VStack(alignment: .trailing, spacing: 5) {
+ Text(consumer.cpuFraction.map { $0.formatted(.percent.precision(.fractionLength(1))) } ?? "—")
+ .monospacedDigit()
+ ProgressView(value: consumer.cpuFraction ?? 0)
+ .tint(Tint.accent)
+ .accessibilityHidden(true)
+ }
+ .frame(width: 92)
+ VStack(alignment: .trailing, spacing: 5) {
+ Text(ByteCountFormatter.string(fromByteCount: Int64(clamping: consumer.residentBytes), countStyle: .memory))
+ .monospacedDigit()
+ ProgressView(value: memoryTotal > 0 ? min(1, Double(consumer.residentBytes) / Double(memoryTotal)) : 0)
+ .tint(Tint.purple)
+ .accessibilityHidden(true)
+ }
+ .frame(width: 122)
+ }
+ .font(.system(size: 11.5, weight: .medium, design: .rounded))
+ .padding(.vertical, 10)
+ .accessibilityElement(children: .combine)
+ }
+}
diff --git a/PureMac/ar.lproj/Localizable.strings b/PureMac/ar.lproj/Localizable.strings
index 47ba32c..f4367f9 100644
--- a/PureMac/ar.lproj/Localizable.strings
+++ b/PureMac/ar.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/de.lproj/Localizable.strings b/PureMac/de.lproj/Localizable.strings
index 515b195..6030ffe 100644
--- a/PureMac/de.lproj/Localizable.strings
+++ b/PureMac/de.lproj/Localizable.strings
@@ -900,3 +900,29 @@
"A PureMac update is available" = "A PureMac update is available";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+
+/* App CPU and memory (#173): English fallbacks */
+"1 process" = "1 process";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
+"Collapsed" = "Collapsed";
+"Expanded" = "Expanded";
+"Live updates paused" = "Live updates paused";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
diff --git a/PureMac/en.lproj/Localizable.strings b/PureMac/en.lproj/Localizable.strings
index 3fd3642..1a93a65 100644
--- a/PureMac/en.lproj/Localizable.strings
+++ b/PureMac/en.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/es.lproj/Localizable.strings b/PureMac/es.lproj/Localizable.strings
index ea905f1..9ac8761 100644
--- a/PureMac/es.lproj/Localizable.strings
+++ b/PureMac/es.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/fr.lproj/Localizable.strings b/PureMac/fr.lproj/Localizable.strings
index 32673ce..41dfa6b 100644
--- a/PureMac/fr.lproj/Localizable.strings
+++ b/PureMac/fr.lproj/Localizable.strings
@@ -485,6 +485,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -867,25 +868,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/ja.lproj/Localizable.strings b/PureMac/ja.lproj/Localizable.strings
index 60a03ed..5f106af 100644
--- a/PureMac/ja.lproj/Localizable.strings
+++ b/PureMac/ja.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/pl.lproj/Localizable.strings b/PureMac/pl.lproj/Localizable.strings
index 17ca40d..10a967f 100644
--- a/PureMac/pl.lproj/Localizable.strings
+++ b/PureMac/pl.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/pt-BR.lproj/Localizable.strings b/PureMac/pt-BR.lproj/Localizable.strings
index 830c3a0..8942e76 100644
--- a/PureMac/pt-BR.lproj/Localizable.strings
+++ b/PureMac/pt-BR.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/ru.lproj/Localizable.strings b/PureMac/ru.lproj/Localizable.strings
index dad65e9..da67f12 100644
--- a/PureMac/ru.lproj/Localizable.strings
+++ b/PureMac/ru.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/uk.lproj/Localizable.strings b/PureMac/uk.lproj/Localizable.strings
index 40941c3..31f6232 100644
--- a/PureMac/uk.lproj/Localizable.strings
+++ b/PureMac/uk.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/zh-Hans.lproj/Localizable.strings b/PureMac/zh-Hans.lproj/Localizable.strings
index a4cf006..24af097 100644
--- a/PureMac/zh-Hans.lproj/Localizable.strings
+++ b/PureMac/zh-Hans.lproj/Localizable.strings
@@ -871,25 +871,50 @@
"tmutil is not available on this Mac." = "此 Mac 上无法使用 tmutil。";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMac/zh-Hant.lproj/Localizable.strings b/PureMac/zh-Hant.lproj/Localizable.strings
index d11264d..b33e8c4 100644
--- a/PureMac/zh-Hant.lproj/Localizable.strings
+++ b/PureMac/zh-Hant.lproj/Localizable.strings
@@ -489,6 +489,7 @@
"%lld files totaling %@ were moved. Every protected copy remains in place." = "%lld files totaling %@ were moved. Every protected copy remains in place.";
"%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place." = "%lld files totaling %@ will be moved to Trash. The protected copy in every group stays in place.";
"%lld folders" = "%lld folders";
+/* Additional interface strings. */
"%lld found" = "%lld found";
"%lld inaccessible" = "%lld inaccessible";
"%lld items · %@ found" = "%lld items · %@ found";
@@ -871,25 +872,50 @@
"tmutil is not available on this Mac." = "tmutil is not available on this Mac.";
/* Additional interface strings. */
+"1 process" = "1 process";
"A PureMac update is available" = "A PureMac update is available";
+"About these readings" = "About these readings";
+"App memory shows resident memory, including shared pages. App totals can differ from the summary." = "App memory shows resident memory, including shared pages. App totals can differ from the summary.";
+"Apps and processes" = "Apps and processes";
"Build %@" = "Build %@";
+"CPU - Memory" = "CPU - Memory";
+"CPU uses the Mac’s total capacity. App helpers are grouped with their app." = "CPU uses the Mac’s total capacity. App helpers are grouped with their app.";
+"CPU values appear after the next sample." = "CPU values appear after the next sample.";
"Check access" = "Check access";
"Checking for updates…" = "Checking for updates…";
"Checks the official app releases on GitHub." = "Checks the official app releases on GitHub.";
+"Collapsed" = "Collapsed";
"Copy command" = "Copy command";
"Download (DMG / ZIP)" = "Download (DMG / ZIP)";
"Download the new app from the release page, quit PureMac, then replace it in Applications." = "Download the new app from the release page, quit PureMac, then replace it in Applications.";
+"Expanded" = "Expanded";
"GitHub is receiving too many requests. Please try again later." = "GitHub is receiving too many requests. Please try again later.";
"Homebrew" = "Homebrew";
"Keep PureMac up to date" = "Keep PureMac up to date";
"Last checked: %@" = "Last checked: %@";
+"Live updates paused" = "Live updates paused";
+
"Make PureMac work your way." = "Make PureMac work your way.";
+"Measuring apps and processes…" = "Measuring apps and processes…";
+"Memory estimate includes active, wired and compressed memory." = "Memory estimate includes active, wired and compressed memory.";
+"Memory in use" = "Memory in use";
+"No matching apps or processes" = "No matching apps or processes";
"No stable PureMac app release was found. Try again later." = "No stable PureMac app release was found. Try again later.";
"Open release page" = "Open release page";
+"Paused" = "Paused";
+"Process information is unavailable. Try Activity Monitor for more detail." = "Process information is unavailable. Try Activity Monitor for more detail.";
"PureMac %@ is available" = "PureMac %@ is available";
+"Restart to apply your language" = "Restart to apply your language";
+"Review Full Disk Access" = "Review Full Disk Access";
+"Review launch at login" = "Review launch at login";
+"Search apps and processes" = "Search apps and processes";
"Settings" = "Settings";
"Settings need attention" = "Settings need attention";
"Settings to review" = "Settings to review";
+"Show all apps and processes" = "Show all apps and processes";
+"Show top 8" = "Show top 8";
+"Some protected or changing processes could not be measured." = "Some protected or changing processes could not be measured.";
+"Sort by" = "Sort by";
"The release service is unavailable. Please try again later." = "The release service is unavailable. Please try again later.";
"This build has no readable version. Open the releases page to check manually." = "This build has no readable version. Open the releases page to check manually.";
"To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later." = "To update with Homebrew, run this command in Terminal. The cask may follow the GitHub release a little later.";
diff --git a/PureMacTests/MonitoringLifecycleTests.swift b/PureMacTests/MonitoringLifecycleTests.swift
new file mode 100644
index 0000000..5815a76
--- /dev/null
+++ b/PureMacTests/MonitoringLifecycleTests.swift
@@ -0,0 +1,63 @@
+import XCTest
+@testable import PureMac
+
+@MainActor
+final class MonitoringLifecycleTests: XCTestCase {
+ func testRepeatedActivationDoesNotLeakSubscriptionsAndLastOwnerStopsSampling() {
+ var samples = 0
+ let monitor = SystemMonitor(sampleAction: { samples += 1 })
+ let page = UUID()
+ monitor.start(owner: page, interval: 1.5)
+ monitor.start(owner: page, interval: 1.5)
+ XCTAssertEqual(samples, 1)
+ XCTAssertTrue(monitor.isSampling)
+ monitor.stop(owner: page)
+ XCTAssertFalse(monitor.isSampling)
+ monitor.stop(owner: page)
+ XCTAssertFalse(monitor.isSampling)
+ }
+
+ func testLeavingPerformanceKeepsOnlyMenuBarIntervalUntilMenuBarStops() {
+ let monitor = SystemMonitor(sampleAction: {})
+ let page = UUID(), menuBar = UUID(), popover = UUID()
+ monitor.start(owner: menuBar)
+ monitor.start(owner: page, interval: 1.5)
+ monitor.start(owner: popover)
+ XCTAssertEqual(monitor.samplingInterval, 1.5)
+ monitor.stop(owner: page)
+ XCTAssertTrue(monitor.isSampling)
+ XCTAssertEqual(monitor.samplingInterval, 2)
+ monitor.stop(owner: popover)
+ XCTAssertTrue(monitor.isSampling)
+ monitor.stop(owner: menuBar)
+ XCTAssertFalse(monitor.isSampling)
+ XCTAssertNil(monitor.samplingInterval)
+ }
+
+ func testQueuedTimerCannotSampleAfterLastOwnerLeaves() async throws {
+ var samples = 0
+ let monitor = SystemMonitor(sampleAction: { samples += 1 })
+ let owner = UUID()
+ monitor.start(owner: owner, interval: 0.1)
+ try await Task.sleep(nanoseconds: 250_000_000)
+ XCTAssertGreaterThan(samples, 1)
+ monitor.stop(owner: owner)
+ let stoppedCount = samples
+ try await Task.sleep(nanoseconds: 250_000_000)
+ XCTAssertEqual(samples, stoppedCount)
+ }
+
+ func testProcessMonitorStopsAndReleasesItsVisibleData() async throws {
+ let monitor = ProcessResourceMonitor()
+ monitor.setActive(true)
+ for _ in 0..<100 where monitor.consumers.isEmpty {
+ try await Task.sleep(nanoseconds: 20_000_000)
+ }
+ XCTAssertFalse(monitor.consumers.isEmpty, "Native read-only sample should include this test host")
+ monitor.setActive(false)
+ XCTAssertFalse(monitor.isSampling)
+ XCTAssertTrue(monitor.consumers.isEmpty)
+ try await Task.sleep(nanoseconds: 100_000_000)
+ XCTAssertTrue(monitor.consumers.isEmpty, "Cancelled work must not publish after hiding")
+ }
+}
diff --git a/PureMacTests/ProcessResourceMonitorTests.swift b/PureMacTests/ProcessResourceMonitorTests.swift
new file mode 100644
index 0000000..60ae2f0
--- /dev/null
+++ b/PureMacTests/ProcessResourceMonitorTests.swift
@@ -0,0 +1,79 @@
+import XCTest
+@testable import PureMac
+
+final class ProcessResourceMonitorTests: XCTestCase {
+ private func reading(pid: Int32 = 42, start: UInt64 = 100, path: String = "/Applications/Example.app/Contents/MacOS/Example", cpu: UInt64 = 0, memory: UInt64 = 100, time: UInt64 = 1_000_000_000) -> ProcessResourceReading {
+ ProcessResourceReading(pid: pid, startSeconds: start, startMicroseconds: 1,
+ executablePath: path, name: URL(fileURLWithPath: path).lastPathComponent,
+ cpuTicks: cpu, residentBytes: memory, sampledAt: time)
+ }
+
+ func testCPUIsNormalizedToTotalMachineCapacity() throws {
+ let before = reading(cpu: 1_000_000_000)
+ let after = reading(cpu: 3_000_000_000, time: 2_000_000_000)
+ XCTAssertEqual(try XCTUnwrap(ProcessResourceMath.cpuFraction(current: after, previous: before, processorCount: 8)), 0.25, accuracy: 0.0001)
+ }
+
+ func testAppleSiliconMachTicksAreConvertedBeforeDividingByNanoseconds() throws {
+ let before = reading(cpu: 0)
+ let after = reading(cpu: 24_000_000, time: 2_000_000_000)
+ let fraction = ProcessResourceMath.cpuFraction(current: after, previous: before,
+ processorCount: 8, nanosecondsPerTick: 125.0 / 3.0)
+ XCTAssertEqual(try XCTUnwrap(fraction), 0.125, accuracy: 0.0001)
+ }
+
+ func testFirstSamplePIDReuseAndCounterResetDoNotProduceFalseSpikes() {
+ let before = reading(cpu: 500)
+ XCTAssertNil(ProcessResourceMath.cpuFraction(current: before, previous: nil, processorCount: 8))
+ XCTAssertNil(ProcessResourceMath.cpuFraction(current: reading(start: 101, cpu: 600, time: 2_000_000_000), previous: before, processorCount: 8))
+ XCTAssertNil(ProcessResourceMath.cpuFraction(current: reading(cpu: 10, time: 2_000_000_000), previous: before, processorCount: 8))
+ XCTAssertNil(ProcessResourceMath.cpuFraction(current: before, previous: before, processorCount: 8))
+ XCTAssertNil(ProcessResourceMath.cpuFraction(current: reading(cpu: 600, time: 2_000_000_000), previous: before, processorCount: 0))
+ XCTAssertNil(ProcessResourceMath.cpuFraction(current: reading(path: "/usr/bin/other", cpu: 600, time: 2_000_000_000), previous: before, processorCount: 8))
+ }
+
+ func testNestedHelpersResolveToOutermostAppAndNonAppsStayUnattributed() {
+ XCTAssertEqual(ProcessResourceMath.applicationPath(for: "/Applications/Example.app/Contents/Frameworks/Helper.app/Contents/MacOS/Helper"), "/Applications/Example.app")
+ XCTAssertEqual(ProcessResourceMath.applicationPath(for: "/Users/someone/My Apps/Example.APP/Contents/XPCServices/a.xpc/a"), "/Users/someone/My Apps/Example.APP")
+ XCTAssertNil(ProcessResourceMath.applicationPath(for: "/usr/local/bin/example.app-helper"))
+ XCTAssertNil(ProcessResourceMath.applicationPath(for: "relative.app/helper"))
+ }
+
+ func testHelpersAggregateMemoryAndIntervalCPUWithoutMixingAppCopies() throws {
+ let oldMain = reading(cpu: 100)
+ let oldHelper = reading(pid: 43, path: "/Applications/Example.app/Contents/Frameworks/Helper.app/Contents/MacOS/Helper", cpu: 100)
+ let main = reading(cpu: 500_000_100, memory: 200, time: 2_000_000_000)
+ let helper = reading(pid: 43, path: oldHelper.executablePath, cpu: 500_000_100, memory: 300, time: 2_000_000_000)
+ let copy = reading(pid: 44, path: "/Users/test/Example.app/Contents/MacOS/Example", memory: 50)
+ let result = ProcessResourceMath.consumers(readings: [main, helper, copy], previous: [oldMain.identity: oldMain, oldHelper.identity: oldHelper], processorCount: 4)
+ XCTAssertEqual(result.count, 2)
+ let app = try XCTUnwrap(result.first { $0.applicationPath == "/Applications/Example.app" })
+ XCTAssertEqual(app.name, "Example")
+ XCTAssertEqual(app.processCount, 2)
+ XCTAssertEqual(app.residentBytes, 500)
+ XCTAssertEqual(try XCTUnwrap(app.cpuFraction), 0.25, accuracy: 0.0001)
+ }
+
+ func testUnknownPathsRemainDistinctAndNewHelperRequiresWarmup() throws {
+ let first = reading(path: "")
+ let second = reading(pid: 43, path: "")
+ XCTAssertEqual(ProcessResourceMath.consumers(readings: [first, second], previous: [:], processorCount: 8).count, 2)
+ let before = reading(cpu: 100)
+ let result = ProcessResourceMath.consumers(readings: [reading(cpu: 600, time: 2_000_000_000), reading(pid: 43)], previous: [before.identity: before], processorCount: 8)
+ XCTAssertEqual(result.count, 1)
+ XCTAssertNil(try XCTUnwrap(result.first).cpuFraction)
+ }
+
+ func testSortingAndSearchKeepMeasuredConsumersFirstAndUseStableTies() {
+ let a = ProcessResourceConsumer(id: "a", name: "Browser", applicationPath: nil, cpuFraction: 0.5, residentBytes: 100, processCount: 1)
+ let b = ProcessResourceConsumer(id: "b", name: "Editor", applicationPath: nil, cpuFraction: 0.1, residentBytes: 500, processCount: 1)
+ let c = ProcessResourceConsumer(id: "c", name: "Browser", applicationPath: nil, cpuFraction: nil, residentBytes: 900, processCount: 1)
+ XCTAssertEqual(ProcessResourceMath.sorted([c, b, a], by: .cpu).map(\.id), ["a", "b", "c"])
+ XCTAssertEqual(ProcessResourceMath.sorted([a, b, c], by: .memory).map(\.id), ["c", "b", "a"])
+ XCTAssertEqual(ProcessResourceMath.sorted([a, b, c], by: .cpu, search: " BROW ").map(\.id), ["a", "c"])
+ XCTAssertTrue(ProcessResourceMath.sorted([a], by: .cpu, search: "missing").isEmpty)
+ XCTAssertEqual(ProcessResourceMath.sorted([a, b], by: .cpu, search: " \n").count, 2)
+ let tied = ProcessResourceConsumer(id: "d", name: a.name, applicationPath: nil, cpuFraction: a.cpuFraction, residentBytes: a.residentBytes, processCount: 1)
+ XCTAssertEqual(ProcessResourceMath.sorted([tied, a], by: .cpu).map(\.id), ["a", "d"])
+ }
+}
diff --git a/README.md b/README.md
index c04be42..1b73910 100644
--- a/README.md
+++ b/README.md
@@ -164,7 +164,7 @@ Cleanup results support name/path search, size and age filters, sorting, and sel
**Protection** checks Gatekeeper, FileVault, the application firewall, System Integrity Protection, and installed XProtect metadata. A failed or unavailable check stays unknown. It also provides shortcuts to privacy and permission settings. This is a configuration audit, not an antivirus or malware scanner.
-**Performance** shows CPU and memory information, lists third-party launch-agent/daemon definitions in a collapsible card, and lists local snapshots. A launch definition is not proof that a process is running. You can open Login Items or Activity Monitor and delete a specific Time Machine local snapshot after confirmation. Snapshot sizes are not estimated, and system update snapshots cannot be removed here.
+**Performance** includes a collapsible CPU–Memory card with live app/process usage, app icons, sorting, search and helper grouping. CPU percentages use the Mac’s total capacity; memory shows resident usage, so shared pages can appear in more than one process. Process sampling pauses when the card is closed or the Performance window loses focus. Summary sampling also stops outside the active Performance page unless the menu-bar system monitor is enabled. Startup/background items have their own collapsible card, and local snapshots are listed separately. A launch definition is not proof that a process is running. You can open Login Items or Activity Monitor and delete a specific Time Machine local snapshot after confirmation. Snapshot sizes are not estimated, and system update snapshots cannot be removed here.
### App updates