Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Give a badge's color to its symbol alone
Țugui Dragoș85bf45749796
diff --git a/Peel/Views/AppHeader.swift b/Peel/Views/AppHeader.swiftindex 8f402101..9d11a735 100644--- a/Peel/Views/AppHeader.swift+++ b/Peel/Views/AppHeader.swift@@ -64,25 +64,25 @@ struct AppHeader<Actions: View>: View {.foregroundStyle(.secondary)if app.isFromAppStore {- Badge(title: Text("App Store"), systemImage: "bag", tint: .secondary)+ Badge(title: Text("App Store"), systemImage: "bag")}if app.isIntelOnly {NoteBadge(- title: Text("Intel only"), systemImage: "cpu", tint: .secondary,+ title: Text("Intel only"), systemImage: "cpu",name: String(localized: "Intel only"),detail: Text("Built for Intel processors only. On Apple silicon it needs Rosetta."))}if sharesStorage {NoteBadge(- title: Text("Shares storage"), systemImage: "link", tint: .secondary,+ title: Text("Shares storage"), systemImage: "link",name: String(localized: "Shares storage"),detail: Text("Most of this app’s files share their space on disk with another copy of it, such as one in the Trash, so moving it frees much less than its size."))}if app.isSystemProtected {NoteBadge(- title: Text("Protected by macOS"), systemImage: "lock", tint: .secondary,+ title: Text("Protected by macOS"), systemImage: "lock",name: String(localized: "Protected by macOS"),detail: Text("macOS keeps this app, so it stays where it is."))diff --git a/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift b/Peel/Views/BackgroundItems/BackgroundItemDetailView.swiftindex d48fa463..1fde02df 100644--- a/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift+++ b/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift@@ -262,7 +262,7 @@ struct BackgroundItemDetailView: View {)}if needsHelper {- Badge(title: Text("Needs administrator access"), systemImage: "lock", tint: .secondary)+ Badge(title: Text("Needs administrator access"), systemImage: "lock")}}}diff --git a/Peel/Views/Badge.swift b/Peel/Views/Badge.swiftindex 6b06a84c..a7c7b872 100644--- a/Peel/Views/Badge.swift+++ b/Peel/Views/Badge.swift@@ -2,30 +2,26 @@ import SwiftUI/// A small tag beside a row, saying what something is or what state it is in.///-/// It has the system's look: caption type, a quiet filled capsule, and the tint carried by the text. Home-/// keeps the album's own marks; everything outside it reads as macOS.+/// It has the system's look: caption type, a quiet filled capsule, and secondary words. Home keeps the album's own+/// marks; everything outside it reads as macOS.struct Badge: View {let title: Textlet systemImage: String- var tint: Color = .secondary- /// A color for the symbol alone, when the mark says how serious something is and the words keep `tint`.- var symbolTint: Color?+ /// The symbol's color, when there is one. The words never take it: a colored word reads under 4.5:1 on a light+ /// background.+ var tint: Color?var body: some View {Label {title} icon: {- if let symbolTint {- Image(systemName: systemImage).rowTint(symbolTint)- } else {- Image(systemName: systemImage)- }+ Image(systemName: systemImage).rowTint(tint)}// One line: a badge that doesn't fit goes to the next line of its row whole, and is cut only when it// is wider than the row itself..lineLimit(1).font(.caption)- .foregroundStyle(tint)+ .foregroundStyle(.secondary).padding(.horizontal, 7).padding(.vertical, 2).background(.quaternary, in: .capsule)@@ -36,7 +32,7 @@ struct Badge: View {struct NoteBadge: View {let title: Textlet systemImage: String- let tint: Color+ var tint: Color?/// Already localized: the heading of the note.let name: Stringlet detail: Textdiff --git a/Peel/Views/Developer/DeveloperDetailView.swift b/Peel/Views/Developer/DeveloperDetailView.swiftindex 20e5bbb5..489001fc 100644--- a/Peel/Views/Developer/DeveloperDetailView.swift+++ b/Peel/Views/Developer/DeveloperDetailView.swift@@ -64,7 +64,7 @@ struct DeveloperDetailView: View {)if keptByDefault > 0 {NoteBadge(- title: Text("\(keptByDefault) kept"), systemImage: "hand.raised", tint: .secondary,+ title: Text("\(keptByDefault) kept"), systemImage: "hand.raised",name: String(localized: "\(keptByDefault) kept"),detail: Text("Archives, symbols from your devices, model weights, installed environments, downloads kept to install again, the build data of a project opened in the last week, an editor’s state for a project that is gone, folders nothing shows the tool made, anything Peel couldn’t measure, and any cache with a wallet, a signing key, or a password database inside are listed but never selected for you."))diff --git a/Peel/Views/Duplicates/DuplicateFolderGroupView.swift b/Peel/Views/Duplicates/DuplicateFolderGroupView.swiftindex 31d4a49d..87c373b9 100644--- a/Peel/Views/Duplicates/DuplicateFolderGroupView.swift+++ b/Peel/Views/Duplicates/DuplicateFolderGroupView.swift@@ -45,9 +45,9 @@ struct DuplicateFolderGroupView: View {.pageTitle().help(Text(verbatim: group.folders[0].url.lastPathComponent))HStack(spacing: 6) {- Badge(title: Text(verbatim: group.size.byteCount), systemImage: "folder", tint: .secondary)- Badge(title: Text("^[\(group.fileCount) file](inflect: true)"), systemImage: "doc", tint: .secondary)- Badge(title: Text(group.folders.count, format: .number), systemImage: "folder.badge.plus", tint: .secondary)+ Badge(title: Text(verbatim: group.size.byteCount), systemImage: "folder")+ Badge(title: Text("^[\(group.fileCount) file](inflect: true)"), systemImage: "doc")+ Badge(title: Text(group.folders.count, format: .number), systemImage: "folder.badge.plus").accessibilityLabel(Text("^[\(group.folders.count) copy](inflect: true)"))}}diff --git a/Peel/Views/Duplicates/DuplicateGroupView.swift b/Peel/Views/Duplicates/DuplicateGroupView.swiftindex 47f99994..88f85670 100644--- a/Peel/Views/Duplicates/DuplicateGroupView.swift+++ b/Peel/Views/Duplicates/DuplicateGroupView.swift@@ -49,12 +49,12 @@ struct DuplicateGroupView: View {.pageTitle().help(Text(verbatim: group.files[0].url.lastPathComponent))FlowLayout(spacing: 6) {- Badge(title: Text(verbatim: group.size.byteCount), systemImage: "doc", tint: .secondary)- Badge(title: Text(group.files.count, format: .number), systemImage: "doc.on.doc", tint: .secondary)+ Badge(title: Text(verbatim: group.size.byteCount), systemImage: "doc")+ Badge(title: Text(group.files.count, format: .number), systemImage: "doc.on.doc").accessibilityLabel(Text("^[\(group.files.count) copy](inflect: true)"))if sharesStorage {NoteBadge(- title: Text("Shares storage"), systemImage: "link", tint: .secondary,+ title: Text("Shares storage"), systemImage: "link",name: String(localized: "Shares storage"),detail: Text("These copies share storage, so removing them frees less than their size."))diff --git a/Peel/Views/Extensions/ExtensionDetailView.swift b/Peel/Views/Extensions/ExtensionDetailView.swiftindex 947b3825..b371a73d 100644--- a/Peel/Views/Extensions/ExtensionDetailView.swift+++ b/Peel/Views/Extensions/ExtensionDetailView.swift@@ -106,12 +106,12 @@ struct ExtensionDetailView: View {} details: {FlowLayout {NoteBadge(- title: Text(item.kind.title), systemImage: item.kind.systemImage, tint: .secondary,+ title: Text(item.kind.title), systemImage: item.kind.systemImage,name: String(localized: item.kind.title),detail: Text(kindNote))NoteBadge(- title: Text("Read only"), systemImage: "hand.raised", tint: .secondary,+ title: Text("Read only"), systemImage: "hand.raised",name: String(localized: "Read only"),detail: Text(explanation))diff --git a/Peel/Views/Homebrew/HomebrewDetailView.swift b/Peel/Views/Homebrew/HomebrewDetailView.swiftindex ed2791d0..8ddbc44a 100644--- a/Peel/Views/Homebrew/HomebrewDetailView.swift+++ b/Peel/Views/Homebrew/HomebrewDetailView.swift@@ -29,9 +29,9 @@ struct HomebrewDetailView: View {.foregroundStyle(.secondary)}FlowLayout(spacing: 6) {- Badge(title: Text(package.kind == .cask ? "Cask" : "Formula"), systemImage: "mug", tint: .secondary)+ Badge(title: Text(package.kind == .cask ? "Cask" : "Formula"), systemImage: "mug")if let version = package.installedVersion {- Badge(title: Text("Version \(version)"), systemImage: "number", tint: .secondary)+ Badge(title: Text("Version \(version)"), systemImage: "number")}if package.waitsForAnUpgrade, let latest = package.latestVersion {Badge(title: Text("Update available: \(latest)"), systemImage: "arrow.down.circle", tint: .blue)@@ -40,19 +40,19 @@ struct HomebrewDetailView: View {Badge(title: Text("^[\(advisory.vulnerabilities.count) known vulnerability](inflect: true)"),systemImage: advisory.highestSeverity.symbol,- symbolTint: advisory.highestSeverity.color+ tint: advisory.highestSeverity.color)}if package.isPinned {NoteBadge(- title: Text("Pinned"), systemImage: "pin", tint: .secondary,+ title: Text("Pinned"), systemImage: "pin",name: String(localized: "Pinned"),detail: Text("Homebrew keeps a pinned package at its version when it upgrades the rest. Run `brew unpin` to let it upgrade again."))}if !package.isInstalledOnRequest {NoteBadge(- title: Text("Dependency"), systemImage: "link", tint: .secondary,+ title: Text("Dependency"), systemImage: "link",name: String(localized: "Dependency"),detail: Text("Homebrew installed this because another package needs it."))diff --git a/Peel/Views/Homebrew/HomebrewList.swift b/Peel/Views/Homebrew/HomebrewList.swiftindex 19862076..f95b5471 100644--- a/Peel/Views/Homebrew/HomebrewList.swift+++ b/Peel/Views/Homebrew/HomebrewList.swift@@ -321,7 +321,7 @@ struct HomebrewList: View {Badge(title: Text(advisory.highestSeverity.title),systemImage: advisory.highestSeverity.symbol,- symbolTint: advisory.highestSeverity.color+ tint: advisory.highestSeverity.color)}.padding(.vertical, 2)@@ -397,9 +397,9 @@ struct HomebrewList: View {}Spacer(minLength: 4)if package.isPinned {- Badge(title: Text("Pinned"), systemImage: "pin", tint: .secondary)+ Badge(title: Text("Pinned"), systemImage: "pin")} else if package.upgradeNeedsAnAdministrator {- Badge(title: Text("Needs Terminal"), systemImage: "terminal", tint: .secondary)+ Badge(title: Text("Needs Terminal"), systemImage: "terminal")}}.padding(.vertical, 2)diff --git a/Peel/Views/Intel/IntelDetailView.swift b/Peel/Views/Intel/IntelDetailView.swiftindex 49d00b51..490693d8 100644--- a/Peel/Views/Intel/IntelDetailView.swift+++ b/Peel/Views/Intel/IntelDetailView.swift@@ -145,7 +145,7 @@ struct IntelDetailView: View {}FlowLayout {NoteBadge(- title: Text("Intel only"), systemImage: "cpu", tint: .secondary,+ title: Text("Intel only"), systemImage: "cpu",name: String(localized: "Intel only"),detail: Text("Built for Intel processors only. On Apple silicon it needs Rosetta."))diff --git a/Peel/Views/Packages/PackageDetailView.swift b/Peel/Views/Packages/PackageDetailView.swiftindex e787bbc0..73ba556a 100644--- a/Peel/Views/Packages/PackageDetailView.swift+++ b/Peel/Views/Packages/PackageDetailView.swift@@ -131,14 +131,14 @@ struct PackageDetailView: View {} details: {FlowLayout {if let version = receipt.version {- Badge(title: Text("Version \(version)"), systemImage: "number", tint: .secondary)+ Badge(title: Text("Version \(version)"), systemImage: "number")}if let date = receipt.installDate {- Badge(title: Text("Installed \(date, format: .dateTime.day().month().year())"), systemImage: "calendar", tint: .secondary)+ Badge(title: Text("Installed \(date, format: .dateTime.day().month().year())"), systemImage: "calendar")}if receipt.nothingLeftOnDisk {NoteBadge(- title: Text("Receipt only"), systemImage: "doc.questionmark", tint: .secondary,+ title: Text("Receipt only"), systemImage: "doc.questionmark",name: String(localized: "Receipt only"),detail: Text("macOS still counts this package as installed, but nothing it put on disk is left."))diff --git a/Peel/Views/Plugins/PluginDetailView.swift b/Peel/Views/Plugins/PluginDetailView.swiftindex 85e425cc..39697262 100644--- a/Peel/Views/Plugins/PluginDetailView.swift+++ b/Peel/Views/Plugins/PluginDetailView.swift@@ -22,10 +22,10 @@ struct PluginDetailView: View {.pageTitle().help(Text(verbatim: plugin.name))FlowLayout(spacing: 6) {- Badge(title: Text(plugin.category.title), systemImage: "powerplug", tint: .secondary)+ Badge(title: Text(plugin.category.title), systemImage: "powerplug")if plugin.isInstalledForAllUsers {NoteBadge(- title: Text("All users"), systemImage: "person.2", tint: .secondary,+ title: Text("All users"), systemImage: "person.2",name: String(localized: "All users"),detail: Text("It’s in /Library, so every account on this Mac has it."))diff --git a/Peel/Views/Projects/ProjectDetailView.swift b/Peel/Views/Projects/ProjectDetailView.swiftindex 9ea14cde..95dc4065 100644--- a/Peel/Views/Projects/ProjectDetailView.swift+++ b/Peel/Views/Projects/ProjectDetailView.swift@@ -110,7 +110,7 @@ struct ProjectDetailView: View {.truncationMode(.middle)if group.lastChange == .recently {NoteBadge(- title: Text("Changed in the last 7 days"), systemImage: "hand.raised", tint: .secondary,+ title: Text("Changed in the last 7 days"), systemImage: "hand.raised",name: String(localized: "Changed in the last 7 days"),detail: Text("Something in this project changed in the last 7 days, so none of it is selected for you."))diff --git a/Peel/Views/Space/SpaceDetailView.swift b/Peel/Views/Space/SpaceDetailView.swiftindex 88a4d3da..87bec141 100644--- a/Peel/Views/Space/SpaceDetailView.swift+++ b/Peel/Views/Space/SpaceDetailView.swift@@ -174,7 +174,7 @@ struct SpaceDetailView: View {Badge(title: Text(item.category.title), systemImage: item.category.systemImage)if item.isReadOnly {NoteBadge(- title: Text("Read only"), systemImage: "hand.raised", tint: .secondary,+ title: Text("Read only"), systemImage: "hand.raised",name: String(localized: "Read only"),detail: Text("Space doesn’t touch this: the app that made it knows what is still needed."))diff --git a/Peel/Views/UpdateStatusBadge.swift b/Peel/Views/UpdateStatusBadge.swiftindex 23293501..d38d56b5 100644--- a/Peel/Views/UpdateStatusBadge.swift+++ b/Peel/Views/UpdateStatusBadge.swift@@ -38,7 +38,6 @@ struct UpdateStatusBadge: View {NoteBadge(title: Text("Can’t check for updates"),systemImage: "questionmark.circle",- tint: .secondary,name: String(localized: "Can’t check for updates"),detail: unsupportedReason,label: Text("Why Peel can’t check \(app.name) for updates")