Feature: Terminal stay open and shortcuts

This commit is contained in:
Hariharan Mudaliar 2026-03-08 17:48:43 +05:30
commit 2085815ab5
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
7 changed files with 104 additions and 5 deletions

View file

@ -5473,6 +5473,29 @@ struct Shortcuts: View {
.font(.caption)
}
Section {
HStack {
VStack(alignment: .leading) {
KeyboardShortcuts.Recorder("Toggle Terminal Tab:", name: .toggleTerminalTab)
.disabled(!enableShortcuts || !Defaults[.enableTerminalFeature])
if !Defaults[.enableTerminalFeature] {
Text("Terminal feature is disabled")
.font(.caption)
.foregroundStyle(.secondary)
.padding(.top, 2)
}
}
Spacer()
}
} header: {
Text("Terminal")
} footer: {
Text("Opens the terminal tab in the notch. Default is Ctrl+`. Only works when terminal feature is enabled.")
.multilineTextAlignment(.trailing)
.foregroundStyle(.secondary)
.font(.caption)
}
Section {
HStack {
VStack(alignment: .leading) {
@ -7218,6 +7241,18 @@ struct TerminalSettings: View {
Section {
Defaults.Toggle("Enable terminal", key: .enableTerminalFeature)
.settingsHighlight(id: highlightID("Enable terminal"))
if enableTerminalFeature {
Defaults.Toggle(key: .terminalStickyMode) {
VStack(alignment: .leading, spacing: 2) {
Text("Keep terminal open until clicked outside")
Text("Prevents the terminal from closing when the cursor accidentally leaves the notch area.")
.font(.caption)
.foregroundStyle(.secondary)
}
}
.settingsHighlight(id: highlightID("Keep terminal open"))
}
} header: {
Text("General")
} footer: {