Yep. AI rewrote the whole thing.
This commit is contained in:
36
Downterm/CommandNotch/Views/HotkeySettingsView.swift
Normal file
36
Downterm/CommandNotch/Views/HotkeySettingsView.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
import SwiftUI
|
||||
|
||||
struct HotkeySettingsView: View {
|
||||
@ObservedObject private var settingsController = AppSettingsController.shared
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
Section("Global") {
|
||||
HotkeyRecorderView(label: "Toggle notch", binding: settingsController.binding(\.hotkeys.toggle))
|
||||
}
|
||||
|
||||
Section("Terminal Tabs (active when notch is open)") {
|
||||
HotkeyRecorderView(label: "New tab", binding: settingsController.binding(\.hotkeys.newTab))
|
||||
HotkeyRecorderView(label: "Close tab", binding: settingsController.binding(\.hotkeys.closeTab))
|
||||
HotkeyRecorderView(label: "Next tab", binding: settingsController.binding(\.hotkeys.nextTab))
|
||||
HotkeyRecorderView(label: "Previous tab", binding: settingsController.binding(\.hotkeys.previousTab))
|
||||
HotkeyRecorderView(label: "Detach tab", binding: settingsController.binding(\.hotkeys.detachTab))
|
||||
}
|
||||
|
||||
Section {
|
||||
Text("⌘1–9 always switch to tab by number. Size preset hotkeys are configured in Terminal > Size Presets.")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
Section {
|
||||
Button("Reset to Defaults") {
|
||||
settingsController.update {
|
||||
$0.hotkeys = AppSettings.default.hotkeys
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.formStyle(.grouped)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user