Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Show Terminal's notices with a colored symbol and secondary words

Țugui Dragoș43324cc2fe15
diff --git a/Peel/Views/Terminal/GitTab.swift b/Peel/Views/Terminal/GitTab.swift
index c139a281..15945fb9 100644
--- a/Peel/Views/Terminal/GitTab.swift
+++ b/Peel/Views/Terminal/GitTab.swift
@@ -22,13 +22,11 @@ struct GitTab: View {
}
} else if state.settings == nil {
Section {
- Label("Git couldn’t read its settings", systemImage: "exclamationmark.triangle")
- .foregroundStyle(Color.accentColor)
+ StatusLabel(title: Text("Git couldn’t read its settings"), tint: .accentColor)
}
} else if git.wasRefused {
Section {
- Label("Git refused it", systemImage: "exclamationmark.triangle")
- .foregroundStyle(Color.accentColor)
+ StatusLabel(title: Text("Git refused it"), tint: .accentColor)
}
}
ForEach(GitSetting.Group.allCases, id: \.self) { group in
diff --git a/Peel/Views/Terminal/SSHTab.swift b/Peel/Views/Terminal/SSHTab.swift
index 3fef5a0d..09421c0c 100644
--- a/Peel/Views/Terminal/SSHTab.swift
+++ b/Peel/Views/Terminal/SSHTab.swift
@@ -12,9 +12,9 @@ struct SSHTab: View {
SSHLinesRow(isIncluded: state.isIncluded)
} footer: {
if ssh.wasRefused {
- Label("macOS refused it", systemImage: "exclamationmark.triangle")
+ StatusLabel(title: Text("macOS refused it"), tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
} else {
Text("What ~/.ssh/config sets earlier for a server stays in force, since ssh uses the first value it finds.")
.font(.caption)
diff --git a/Peel/Views/Terminal/ShellTab.swift b/Peel/Views/Terminal/ShellTab.swift
index b64d2988..05edc4b9 100644
--- a/Peel/Views/Terminal/ShellTab.swift
+++ b/Peel/Views/Terminal/ShellTab.swift
@@ -12,9 +12,9 @@ struct ShellTab: View {
ShellLineRow(state: state)
} footer: {
if shell.wasRefused {
- Label("macOS refused it", systemImage: "exclamationmark.triangle")
+ StatusLabel(title: Text("macOS refused it"), tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
} else if state.startupFile != nil {
Text("Takes effect in new windows")
.font(.caption)
@@ -176,19 +176,19 @@ private struct PromptSection: View {
Text("Prompt")
} footer: {
if prompt != nil, !state.isSourced, let startupFile = state.startupFile {
- Label(
- "zsh shows this prompt once Peel’s line is in \(startupFile.abbreviatedPath).",
- systemImage: "exclamationmark.triangle"
+ StatusLabel(
+ title: Text("zsh shows this prompt once Peel’s line is in \(startupFile.abbreviatedPath)."),
+ tint: .accentColor
)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
} else if prompt != nil, state.setsItsOwnPrompt, let startupFile = state.startupFile {
- Label(
- "Your \(startupFile.abbreviatedPath) sets its own prompt after Peel’s line, so zsh shows that one.",
- systemImage: "exclamationmark.triangle"
+ StatusLabel(
+ title: Text("Your \(startupFile.abbreviatedPath) sets its own prompt after Peel’s line, so zsh shows that one."),
+ tint: .accentColor
)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
} else {
Text("The colors are the Terminal theme’s.")
.font(.caption)
diff --git a/Peel/Views/Terminal/TerminalPage.swift b/Peel/Views/Terminal/TerminalPage.swift
index bdda301f..24ec2aac 100644
--- a/Peel/Views/Terminal/TerminalPage.swift
+++ b/Peel/Views/Terminal/TerminalPage.swift
@@ -161,13 +161,13 @@ private struct TerminalThemeInUse: View {
.disabled(terminal.isQuittingTerminal)
.padding(.top, 4)
if terminal.isManaged {
- Label("Locked by a profile", systemImage: "lock")
+ StatusLabel(title: Text("Locked by a profile"), systemImage: "lock", tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
} else if terminal.wasRefused {
- Label("macOS refused it", systemImage: "exclamationmark.triangle")
+ StatusLabel(title: Text("macOS refused it"), tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
}
}
.motion(value: terminal.canPutBack)
@@ -221,17 +221,17 @@ private struct TerminalSettingsForm: View {
Text("Theme in Use")
} footer: {
if terminal.isManaged {
- Label("Locked by a profile", systemImage: "lock")
+ StatusLabel(title: Text("Locked by a profile"), systemImage: "lock", tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
} else if terminal.options == nil {
Text("Choose one of Peel’s themes to change these settings.")
.font(.caption)
.foregroundStyle(.secondary)
} else if terminal.wasRefused {
- Label("macOS refused it", systemImage: "exclamationmark.triangle")
+ StatusLabel(title: Text("macOS refused it"), tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
}
}
}
diff --git a/Peel/Views/Terminal/ToolsTab.swift b/Peel/Views/Terminal/ToolsTab.swift
index eb6c99f6..17006ad7 100644
--- a/Peel/Views/Terminal/ToolsTab.swift
+++ b/Peel/Views/Terminal/ToolsTab.swift
@@ -78,13 +78,13 @@ private struct TerminalToolRow: View {
.foregroundStyle(.secondary)
switch tools.availability(of: tool) {
case .unknownToHomebrew:
- Text("Homebrew no longer offers it.")
+ StatusLabel(title: Text("Homebrew no longer offers it."), tint: .accentColor)
.font(.caption)
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
case .retired(let retirement):
- retirement.title
+ StatusLabel(title: retirement.title, tint: .accentColor)
.font(.caption.weight(.semibold))
- .foregroundStyle(Color.accentColor)
+ .foregroundStyle(.secondary)
retirement.explanation(now: .now)
.font(.caption)
.foregroundStyle(.secondary)