mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Feature: Terminal stay open and shortcuts
This commit is contained in:
parent
39d1135006
commit
2085815ab5
7 changed files with 104 additions and 5 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue