Add themes selector
This commit is contained in:
@@ -265,6 +265,7 @@ struct TerminalSettingsView: View {
|
||||
|
||||
@AppStorage(NotchSettings.Keys.terminalFontSize) private var fontSize = NotchSettings.Defaults.terminalFontSize
|
||||
@AppStorage(NotchSettings.Keys.terminalShell) private var shellPath = NotchSettings.Defaults.terminalShell
|
||||
@AppStorage(NotchSettings.Keys.terminalTheme) private var theme = NotchSettings.Defaults.terminalTheme
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
@@ -275,6 +276,21 @@ struct TerminalSettingsView: View {
|
||||
Text("\(Int(fontSize))pt").monospacedDigit().frame(width: 50)
|
||||
}
|
||||
}
|
||||
Section("Colors") {
|
||||
Picker("Theme", selection: $theme) {
|
||||
ForEach(TerminalTheme.allCases) { terminalTheme in
|
||||
Text(terminalTheme.label).tag(terminalTheme.rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
Text(TerminalTheme.resolve(theme).detail)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Text("Applies to normal terminal text and the ANSI palette used by tools like `ls`.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Section("Shell") {
|
||||
TextField("Shell path (empty = $SHELL)", text: $shellPath)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
|
||||
Reference in New Issue
Block a user