mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update stuff
This commit is contained in:
parent
e59d35d89a
commit
1441f83388
6 changed files with 456 additions and 30 deletions
|
|
@ -1595,6 +1595,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"±10 Seconds" : {
|
||||||
|
"comment" : "Display name for the \"±10 Seconds\" music skip behavior option.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"0" : {
|
"0" : {
|
||||||
"comment" : "A label displayed in a circular gauge to indicate the minimum battery level.",
|
"comment" : "A label displayed in a circular gauge to indicate the minimum battery level.",
|
||||||
"isCommentAutoGenerated" : true,
|
"isCommentAutoGenerated" : true,
|
||||||
|
|
@ -1911,6 +1915,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Accent" : {
|
||||||
|
"comment" : "Display name for the \"Accent\" caps lock indicator tint mode.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Accent color" : {
|
"Accent color" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
@ -2256,6 +2264,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Adaptive gradient" : {
|
||||||
|
"comment" : "Name of the timer icon color mode option that uses an adaptive gradient.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Add" : {
|
"Add" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
@ -2748,9 +2760,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Adds a Guake-style dropdown terminal tab. The terminal runs a shell session that persists while the notch is open." : {
|
"Adds a Guake-style dropdown terminal tab. The terminal session persists across notch open/close cycles." : {
|
||||||
"comment" : "A description of the terminal settings feature.",
|
|
||||||
"isCommentAutoGenerated" : true
|
|
||||||
},
|
},
|
||||||
"Adds a notch HUD when Caps Lock is enabled, with optional label and tint controls." : {
|
"Adds a notch HUD when Caps Lock is enabled, with optional label and tint controls." : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -3352,6 +3363,9 @@
|
||||||
"Allow minimalistic overrides" : {
|
"Allow minimalistic overrides" : {
|
||||||
"comment" : "Label for a toggle that allows minimalistic overrides in notch experiences.",
|
"comment" : "Label for a toggle that allows minimalistic overrides in notch experiences.",
|
||||||
"isCommentAutoGenerated" : true
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Allow mouse reporting" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Allowed Features" : {
|
"Allowed Features" : {
|
||||||
"comment" : "A label describing the allowed features for an app extension.",
|
"comment" : "A label describing the allowed features for an app extension.",
|
||||||
|
|
@ -3849,6 +3863,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Apple Music" : {
|
||||||
|
"comment" : "Localized name for the \"Now Playing\" media controller type.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Applies the notch-style parallax effect to the lock screen media widget album art." : {
|
"Applies the notch-style parallax effect to the lock screen media widget album art." : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"pt-BR" : {
|
"pt-BR" : {
|
||||||
|
|
@ -4247,6 +4265,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Background" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Backlight" : {
|
"Backlight" : {
|
||||||
"comment" : "A control for adjusting the keyboard backlight intensity.",
|
"comment" : "A control for adjusting the keyboard backlight intensity.",
|
||||||
|
|
@ -4260,6 +4281,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Bar" : {
|
||||||
|
"comment" : "Localized name for the 'Bar' timer progress style.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Battery" : {
|
"Battery" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
@ -4825,6 +4850,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Bold text as bright colors" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Boost your productivity with Clipboard Manager" : {
|
"Boost your productivity with Clipboard Manager" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -6877,6 +6905,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Colors" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Coming soon" : {
|
"Coming soon" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -7477,6 +7508,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Cursor" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Cursor style" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Custom" : {
|
"Custom" : {
|
||||||
"extractionState" : "stale",
|
"extractionState" : "stale",
|
||||||
|
|
@ -8518,6 +8555,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Digital" : {
|
||||||
|
"comment" : "The display name for the \"Digital\" reminder presentation style.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Dimensions" : {
|
"Dimensions" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"pt-BR" : {
|
"pt-BR" : {
|
||||||
|
|
@ -11054,6 +11095,9 @@
|
||||||
"Font size" : {
|
"Font size" : {
|
||||||
"comment" : "A label displayed above a slider that controls the font size of the terminal",
|
"comment" : "A label displayed above a slider that controls the font size of the terminal",
|
||||||
"isCommentAutoGenerated" : true
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Foreground" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Free · %@" : {
|
"Free · %@" : {
|
||||||
"comment" : "A label displaying the amount of free storage on a disk device. The argument is the number of free bytes on the disk.",
|
"comment" : "A label displaying the amount of free storage on a disk device. The argument is the number of free bytes on the disk.",
|
||||||
|
|
@ -11910,6 +11954,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Green" : {
|
||||||
|
"comment" : "Name of the \"Green\" Caps Lock Indicator Tint Mode.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Height:" : {
|
"Height:" : {
|
||||||
"extractionState" : "stale",
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -12998,6 +13046,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Input" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Install [BetterDisplay](https://betterdisplay.pro) to control external display brightness and volume through Atoll's HUD." : {
|
"Install [BetterDisplay](https://betterdisplay.pro) to control external display brightness and volume through Atoll's HUD." : {
|
||||||
"comment" : "A description of the benefits of installing BetterDisplay.",
|
"comment" : "A description of the benefits of installing BetterDisplay.",
|
||||||
|
|
@ -15584,7 +15635,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Minutes" : {
|
"Minutes" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"fr" : {
|
"fr" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
|
|
@ -17800,6 +17850,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Now Playing" : {
|
||||||
|
"comment" : "Localized name for each media controller type.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Number of lines kept in the scrollback buffer. Higher values use more memory." : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Off" : {
|
"Off" : {
|
||||||
"comment" : "Text displayed in a status label at the top of the screen indicating whether low power mode is on or off.",
|
"comment" : "Text displayed in a status label at the top of the screen indicating whether low power mode is on or off.",
|
||||||
|
|
@ -18130,6 +18187,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Option as Meta key" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Option as Meta sends Esc+key instead of macOS special characters. Mouse reporting forwards mouse events to terminal applications like vim or tmux." : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Output devices" : {
|
"Output devices" : {
|
||||||
"comment" : "Section title for the list of available audio output devices in the media output selector.",
|
"comment" : "Section title for the list of available audio output devices in the media output selector.",
|
||||||
|
|
@ -18167,6 +18230,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Panel" : {
|
||||||
|
"comment" : "Display name for the \"Panel\" clipboard display mode.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Panel mode shows clipboard in a floating window near the notch." : {
|
"Panel mode shows clipboard in a floating window near the notch." : {
|
||||||
"comment" : "A description of the \"Panel\" clipboard display mode.",
|
"comment" : "A description of the \"Panel\" clipboard display mode.",
|
||||||
"isCommentAutoGenerated" : true,
|
"isCommentAutoGenerated" : true,
|
||||||
|
|
@ -19781,6 +19848,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Ring" : {
|
||||||
|
"comment" : "Localized name for the \"Ring\" timer progress style.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Rotation:" : {
|
"Rotation:" : {
|
||||||
"extractionState" : "stale",
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -20093,6 +20164,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Scrollback" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Scrollback lines" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Search clipboard..." : {
|
"Search clipboard..." : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -20601,6 +20678,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Separate Tab" : {
|
||||||
|
"comment" : "Name of the clipboard display mode option that opens the clipboard in a separate tab.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Separate Tab mode integrates Copied Items and Notes into a single view. If both are enabled, Notes appear on the right and Clipboard on the left." : {
|
"Separate Tab mode integrates Copied Items and Notes into a single view. If both are enabled, Notes appear on the right and Clipboard on the left." : {
|
||||||
"comment" : "A description of the \"Separate Tab\" clipboard display mode.",
|
"comment" : "A description of the \"Separate Tab\" clipboard display mode.",
|
||||||
"isCommentAutoGenerated" : true,
|
"isCommentAutoGenerated" : true,
|
||||||
|
|
@ -20864,6 +20945,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Shell" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Shell path" : {
|
"Shell path" : {
|
||||||
"comment" : "A setting option for the path to the shell to use in the terminal",
|
"comment" : "A setting option for the path to the shell to use in the terminal",
|
||||||
|
|
@ -21659,6 +21743,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Shows screen assistant as a dropdown attached to the AI button" : {
|
||||||
|
"comment" : "Description of the \"Popover\" display mode for the screen assistant.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Shows screen assistant in a floating panel near the notch" : {
|
||||||
|
"comment" : "Description of the \"panel\" display mode for the screen assistant.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Shows the model's reasoning process before the final answer" : {
|
"Shows the model's reasoning process before the final answer" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"fr" : {
|
"fr" : {
|
||||||
|
|
@ -21721,6 +21813,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Skip forward or backward by ten seconds" : {
|
||||||
|
"comment" : "Description of the \"Skip forward or backward by ten seconds\" music skip behavior.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Slider color" : {
|
"Slider color" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
@ -22289,6 +22385,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Spotify" : {
|
||||||
|
"comment" : "Add more media controller types here.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Square" : {
|
"Square" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
@ -22401,6 +22501,10 @@
|
||||||
},
|
},
|
||||||
"Standard notch media controls are hidden. Re-enable the toggle above to restore them." : {
|
"Standard notch media controls are hidden. Re-enable the toggle above to restore them." : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Standard previous/next track controls" : {
|
||||||
|
"comment" : "Description of a music skip behavior option that uses standard previous/next track controls.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
},
|
},
|
||||||
"Start" : {
|
"Start" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -23762,6 +23866,10 @@
|
||||||
},
|
},
|
||||||
"shouldTranslate" : false
|
"shouldTranslate" : false
|
||||||
},
|
},
|
||||||
|
"Track Skip" : {
|
||||||
|
"comment" : "Name of the music skip behavior option that skips to the next track.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Transform" : {
|
"Transform" : {
|
||||||
"extractionState" : "stale",
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -25315,6 +25423,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"When bold-as-bright is off, bold text uses a heavier font weight instead of bright ANSI colors." : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"When disabled, all keyboard shortcuts will be inactive. You can still use the UI controls." : {
|
"When disabled, all keyboard shortcuts will be inactive. You can still use the UI controls." : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -25680,6 +25791,10 @@
|
||||||
"comment" : "A footer note explaining the app's funding.",
|
"comment" : "A footer note explaining the app's funding.",
|
||||||
"isCommentAutoGenerated" : true
|
"isCommentAutoGenerated" : true
|
||||||
},
|
},
|
||||||
|
"Youtube Music" : {
|
||||||
|
"comment" : "Add more media player types here.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"YouTube Music requires this third-party app to be installed: " : {
|
"YouTube Music requires this third-party app to be installed: " : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ struct InlineHUD: View {
|
||||||
LoopingVideoIcon(url: url, size: CGSize(width: 20, height: 20))
|
LoopingVideoIcon(url: url, size: CGSize(width: 20, height: 20))
|
||||||
.frame(width: 20, height: 20, alignment: .center)
|
.frame(width: 20, height: 20, alignment: .center)
|
||||||
} else {
|
} else {
|
||||||
Image(systemName: icon.isEmpty ? "bluetooth" : icon)
|
Image(systemName: icon.isEmpty ? "dot.radiowaves.left.and.right" : icon)
|
||||||
.symbolRenderingMode(.hierarchical)
|
.symbolRenderingMode(.hierarchical)
|
||||||
.contentTransition(.interpolate)
|
.contentTransition(.interpolate)
|
||||||
.frame(width: 20, height: 15, alignment: .center)
|
.frame(width: 20, height: 15, alignment: .center)
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,9 @@ struct NotchTerminalView: View {
|
||||||
Divider()
|
Divider()
|
||||||
.padding(.horizontal, 8)
|
.padding(.horizontal, 8)
|
||||||
|
|
||||||
// Terminal content — .id(sessionGeneration) forces
|
// Terminal content — the containerView is stable across
|
||||||
// representable recreation only after an explicit restart.
|
// notch close/open cycles; updateNSView handles restart.
|
||||||
TerminalNSViewRepresentable(terminalManager: terminalManager)
|
TerminalNSViewRepresentable(terminalManager: terminalManager)
|
||||||
.id(terminalManager.sessionGeneration)
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 6, style: .continuous))
|
.clipShape(RoundedRectangle(cornerRadius: 6, style: .continuous))
|
||||||
.padding(.horizontal, 8)
|
.padding(.horizontal, 8)
|
||||||
.padding(.bottom, 8)
|
.padding(.bottom, 8)
|
||||||
|
|
|
||||||
|
|
@ -794,6 +794,14 @@ struct SettingsView: View {
|
||||||
SettingsSearchEntry(tab: .terminal, title: "Font size", keywords: ["terminal", "font", "text size"], highlightID: SettingsTab.terminal.highlightID(for: "Font size")),
|
SettingsSearchEntry(tab: .terminal, title: "Font size", keywords: ["terminal", "font", "text size"], highlightID: SettingsTab.terminal.highlightID(for: "Font size")),
|
||||||
SettingsSearchEntry(tab: .terminal, title: "Terminal opacity", keywords: ["terminal", "opacity", "transparency"], highlightID: SettingsTab.terminal.highlightID(for: "Terminal opacity")),
|
SettingsSearchEntry(tab: .terminal, title: "Terminal opacity", keywords: ["terminal", "opacity", "transparency"], highlightID: SettingsTab.terminal.highlightID(for: "Terminal opacity")),
|
||||||
SettingsSearchEntry(tab: .terminal, title: "Maximum height", keywords: ["terminal", "height", "size"], highlightID: SettingsTab.terminal.highlightID(for: "Maximum height")),
|
SettingsSearchEntry(tab: .terminal, title: "Maximum height", keywords: ["terminal", "height", "size"], highlightID: SettingsTab.terminal.highlightID(for: "Maximum height")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Background color", keywords: ["terminal", "background", "color", "theme"], highlightID: SettingsTab.terminal.highlightID(for: "Background color")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Foreground color", keywords: ["terminal", "foreground", "text color", "theme"], highlightID: SettingsTab.terminal.highlightID(for: "Foreground color")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Cursor color", keywords: ["terminal", "cursor", "caret", "color"], highlightID: SettingsTab.terminal.highlightID(for: "Cursor color")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Bold as bright", keywords: ["terminal", "bold", "bright", "colors"], highlightID: SettingsTab.terminal.highlightID(for: "Bold as bright")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Cursor style", keywords: ["terminal", "cursor", "block", "underline", "bar", "blink"], highlightID: SettingsTab.terminal.highlightID(for: "Cursor style")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Scrollback lines", keywords: ["terminal", "scrollback", "buffer", "history"], highlightID: SettingsTab.terminal.highlightID(for: "Scrollback lines")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Option as Meta", keywords: ["terminal", "option", "meta", "alt", "key"], highlightID: SettingsTab.terminal.highlightID(for: "Option as Meta")),
|
||||||
|
SettingsSearchEntry(tab: .terminal, title: "Mouse reporting", keywords: ["terminal", "mouse", "reporting", "vim", "tmux"], highlightID: SettingsTab.terminal.highlightID(for: "Mouse reporting")),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7016,6 +7024,14 @@ struct TerminalSettings: View {
|
||||||
@Default(.terminalFontSize) var terminalFontSize
|
@Default(.terminalFontSize) var terminalFontSize
|
||||||
@Default(.terminalOpacity) var terminalOpacity
|
@Default(.terminalOpacity) var terminalOpacity
|
||||||
@Default(.terminalMaxHeightFraction) var terminalMaxHeightFraction
|
@Default(.terminalMaxHeightFraction) var terminalMaxHeightFraction
|
||||||
|
@Default(.terminalCursorStyle) var terminalCursorStyle
|
||||||
|
@Default(.terminalScrollbackLines) var terminalScrollbackLines
|
||||||
|
@Default(.terminalOptionAsMeta) var terminalOptionAsMeta
|
||||||
|
@Default(.terminalMouseReporting) var terminalMouseReporting
|
||||||
|
@Default(.terminalBoldAsBright) var terminalBoldAsBright
|
||||||
|
@Default(.terminalBackgroundColor) var terminalBackgroundColor
|
||||||
|
@Default(.terminalForegroundColor) var terminalForegroundColor
|
||||||
|
@Default(.terminalCursorColor) var terminalCursorColor
|
||||||
|
|
||||||
private func highlightID(_ title: String) -> String {
|
private func highlightID(_ title: String) -> String {
|
||||||
SettingsTab.terminal.highlightID(for: title)
|
SettingsTab.terminal.highlightID(for: title)
|
||||||
|
|
@ -7025,6 +7041,13 @@ struct TerminalSettings: View {
|
||||||
"\(Int(terminalMaxHeightFraction * 100))% of screen"
|
"\(Int(terminalMaxHeightFraction * 100))% of screen"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var cursorStyleBinding: Binding<TerminalCursorStyleOption> {
|
||||||
|
Binding(
|
||||||
|
get: { TerminalCursorStyleOption(rawValue: terminalCursorStyle) ?? .blinkBlock },
|
||||||
|
set: { terminalCursorStyle = $0.rawValue }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
Section {
|
Section {
|
||||||
|
|
@ -7033,12 +7056,13 @@ struct TerminalSettings: View {
|
||||||
} header: {
|
} header: {
|
||||||
Text("General")
|
Text("General")
|
||||||
} footer: {
|
} footer: {
|
||||||
Text("Adds a Guake-style dropdown terminal tab. The terminal runs a shell session that persists while the notch is open.")
|
Text("Adds a Guake-style dropdown terminal tab. The terminal session persists across notch open/close cycles.")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
if enableTerminalFeature {
|
if enableTerminalFeature {
|
||||||
|
// MARK: Shell
|
||||||
Section {
|
Section {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Shell path")
|
Text("Shell path")
|
||||||
|
|
@ -7049,7 +7073,12 @@ struct TerminalSettings: View {
|
||||||
.multilineTextAlignment(.trailing)
|
.multilineTextAlignment(.trailing)
|
||||||
}
|
}
|
||||||
.settingsHighlight(id: highlightID("Shell path"))
|
.settingsHighlight(id: highlightID("Shell path"))
|
||||||
|
} header: {
|
||||||
|
Text("Shell")
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: Appearance
|
||||||
|
Section {
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Font size")
|
Text("Font size")
|
||||||
|
|
@ -7095,6 +7124,109 @@ struct TerminalSettings: View {
|
||||||
Text("Appearance")
|
Text("Appearance")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Colors
|
||||||
|
Section {
|
||||||
|
ColorPicker("Background", selection: $terminalBackgroundColor, supportsOpacity: false)
|
||||||
|
.onChange(of: terminalBackgroundColor) { _, newValue in
|
||||||
|
terminalManager.applyBackgroundColor(newValue)
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Background color"))
|
||||||
|
|
||||||
|
ColorPicker("Foreground", selection: $terminalForegroundColor, supportsOpacity: false)
|
||||||
|
.onChange(of: terminalForegroundColor) { _, newValue in
|
||||||
|
terminalManager.applyForegroundColor(newValue)
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Foreground color"))
|
||||||
|
|
||||||
|
ColorPicker("Cursor", selection: $terminalCursorColor, supportsOpacity: false)
|
||||||
|
.onChange(of: terminalCursorColor) { _, newValue in
|
||||||
|
terminalManager.applyCursorColor(newValue)
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Cursor color"))
|
||||||
|
|
||||||
|
Toggle("Bold text as bright colors", isOn: $terminalBoldAsBright)
|
||||||
|
.onChange(of: terminalBoldAsBright) { _, newValue in
|
||||||
|
terminalManager.applyBoldAsBright(newValue)
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Bold as bright"))
|
||||||
|
} header: {
|
||||||
|
Text("Colors")
|
||||||
|
} footer: {
|
||||||
|
Text("When bold-as-bright is off, bold text uses a heavier font weight instead of bright ANSI colors.")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: Cursor
|
||||||
|
Section {
|
||||||
|
Picker("Cursor style", selection: cursorStyleBinding) {
|
||||||
|
ForEach(TerminalCursorStyleOption.allCases, id: \.self) { style in
|
||||||
|
Text(style.displayName).tag(style)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.onChange(of: terminalCursorStyle) { _, newValue in
|
||||||
|
if let style = TerminalCursorStyleOption(rawValue: newValue) {
|
||||||
|
terminalManager.applyCursorStyle(style)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Cursor style"))
|
||||||
|
} header: {
|
||||||
|
Text("Cursor")
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: Scrollback
|
||||||
|
Section {
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
|
HStack {
|
||||||
|
Text("Scrollback lines")
|
||||||
|
Spacer()
|
||||||
|
Text("\(terminalScrollbackLines)")
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.monospacedDigit()
|
||||||
|
}
|
||||||
|
Slider(
|
||||||
|
value: Binding(
|
||||||
|
get: { Double(terminalScrollbackLines) },
|
||||||
|
set: { terminalScrollbackLines = Int($0) }
|
||||||
|
),
|
||||||
|
in: 100...10000,
|
||||||
|
step: 100
|
||||||
|
)
|
||||||
|
.onChange(of: terminalScrollbackLines) { _, newValue in
|
||||||
|
terminalManager.applyScrollback(newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Scrollback lines"))
|
||||||
|
} header: {
|
||||||
|
Text("Scrollback")
|
||||||
|
} footer: {
|
||||||
|
Text("Number of lines kept in the scrollback buffer. Higher values use more memory.")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: Input
|
||||||
|
Section {
|
||||||
|
Toggle("Option as Meta key", isOn: $terminalOptionAsMeta)
|
||||||
|
.onChange(of: terminalOptionAsMeta) { _, newValue in
|
||||||
|
terminalManager.applyOptionAsMeta(newValue)
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Option as Meta"))
|
||||||
|
|
||||||
|
Toggle("Allow mouse reporting", isOn: $terminalMouseReporting)
|
||||||
|
.onChange(of: terminalMouseReporting) { _, newValue in
|
||||||
|
terminalManager.applyMouseReporting(newValue)
|
||||||
|
}
|
||||||
|
.settingsHighlight(id: highlightID("Mouse reporting"))
|
||||||
|
} header: {
|
||||||
|
Text("Input")
|
||||||
|
} footer: {
|
||||||
|
Text("Option as Meta sends Esc+key instead of macOS special characters. Mouse reporting forwards mouse events to terminal applications like vim or tmux.")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: Actions
|
||||||
Section {
|
Section {
|
||||||
Button("Restart Shell") {
|
Button("Restart Shell") {
|
||||||
terminalManager.restartShell()
|
terminalManager.restartShell()
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,53 @@ import SwiftUI
|
||||||
import SwiftTerm
|
import SwiftTerm
|
||||||
import Defaults
|
import Defaults
|
||||||
|
|
||||||
|
// MARK: - Stable Container
|
||||||
|
|
||||||
|
/// Container NSView that shields its terminal child from zero-sized frames.
|
||||||
|
///
|
||||||
|
/// When the notch closes, SwiftUI removes the `NSViewRepresentable` from the
|
||||||
|
/// hierarchy — but later re-adds the same `containerView` on reopen. During
|
||||||
|
/// that insertion, SwiftUI momentarily sets the frame to `.zero`. Without
|
||||||
|
/// protection, AppKit's autoresizing mask propagates the zero frame to the
|
||||||
|
/// terminal child, causing SwiftTerm's `processSizeChange` to resize the
|
||||||
|
/// emulator to 2 cols × 1 row (the enforced minimum), which destroys the
|
||||||
|
/// scrollback buffer.
|
||||||
|
///
|
||||||
|
/// We bypass `super.resizeSubviews(withOldSize:)` entirely and manually set
|
||||||
|
/// children to fill the container's bounds. This avoids the autoresizing
|
||||||
|
/// calculation which produces corrupt geometry when `oldSize` was `.zero`
|
||||||
|
/// (recorded during the transient removal) but the child kept its previous
|
||||||
|
/// large frame.
|
||||||
|
final class StableTerminalContainerView: NSView {
|
||||||
|
override func resizeSubviews(withOldSize oldSize: NSSize) {
|
||||||
|
let size = bounds.size
|
||||||
|
// Block degenerate sizes — the terminal would collapse to 2×1
|
||||||
|
guard size.width >= 10, size.height >= 10 else { return }
|
||||||
|
// Manually fill children to bounds — bypasses autoresizing math
|
||||||
|
// that breaks when oldSize was zero but child kept its old frame.
|
||||||
|
for child in subviews {
|
||||||
|
child.frame = bounds
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewDidMoveToWindow() {
|
||||||
|
super.viewDidMoveToWindow()
|
||||||
|
guard window != nil else { return }
|
||||||
|
// When re-inserted into a window (notch reopened), force a full
|
||||||
|
// redraw so SwiftTerm re-renders the terminal buffer contents.
|
||||||
|
for child in subviews {
|
||||||
|
child.needsDisplay = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - Terminal Manager
|
||||||
|
|
||||||
/// Manages the Guake-style dropdown terminal session lifecycle.
|
/// Manages the Guake-style dropdown terminal session lifecycle.
|
||||||
/// The terminal is lazily created when the user first switches to the terminal tab,
|
/// The terminal is lazily created when the user first switches to the terminal tab,
|
||||||
/// and the process is kept alive across notch open/close cycles.
|
/// and the process is kept alive across notch open/close cycles.
|
||||||
///
|
///
|
||||||
/// Uses a stable `containerView` (NSView) as the host so that SwiftUI's
|
/// Uses a stable `StableTerminalContainerView` as the host so that SwiftUI's
|
||||||
/// `NSViewRepresentable` lifecycle (make/update/dismantle) never tears down
|
/// `NSViewRepresentable` lifecycle (make/update/dismantle) never tears down
|
||||||
/// the actual terminal. The `LocalProcessTerminalView` is added as a subview
|
/// the actual terminal. The `LocalProcessTerminalView` is added as a subview
|
||||||
/// of the container and survives notch close/open cycles.
|
/// of the container and survives notch close/open cycles.
|
||||||
|
|
@ -39,12 +81,11 @@ class TerminalManager: ObservableObject {
|
||||||
/// The current terminal title reported by the shell.
|
/// The current terminal title reported by the shell.
|
||||||
@Published var terminalTitle: String = "Terminal"
|
@Published var terminalTitle: String = "Terminal"
|
||||||
|
|
||||||
/// Bumped on restart so the `NSViewRepresentable` can recreate via `.id()`.
|
|
||||||
@Published var sessionGeneration: Int = 0
|
|
||||||
|
|
||||||
/// Stable container returned to SwiftUI — never deallocated.
|
/// Stable container returned to SwiftUI — never deallocated.
|
||||||
let containerView: NSView = {
|
/// Uses `StableTerminalContainerView` to prevent zero-frame transients
|
||||||
let v = NSView(frame: .zero)
|
/// from destroying the scrollback buffer.
|
||||||
|
let containerView: StableTerminalContainerView = {
|
||||||
|
let v = StableTerminalContainerView(frame: .zero)
|
||||||
v.autoresizingMask = [.width, .height]
|
v.autoresizingMask = [.width, .height]
|
||||||
v.wantsLayer = true
|
v.wantsLayer = true
|
||||||
return v
|
return v
|
||||||
|
|
@ -63,24 +104,25 @@ class TerminalManager: ObservableObject {
|
||||||
if let existing = terminalView, existing.superview === containerView {
|
if let existing = terminalView, existing.superview === containerView {
|
||||||
// Already mounted — just re-wire the delegate in case the coordinator changed.
|
// Already mounted — just re-wire the delegate in case the coordinator changed.
|
||||||
existing.processDelegate = delegate
|
existing.processDelegate = delegate
|
||||||
|
// Force a redraw — the view may have been off-screen (notch closed)
|
||||||
|
// and needs to re-render the terminal buffer.
|
||||||
|
existing.needsDisplay = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let view = LocalProcessTerminalView(frame: containerView.bounds)
|
// Use the container's current bounds if valid, otherwise a reasonable
|
||||||
|
// default. SwiftTerm's init calls setupOptions() which reads the
|
||||||
|
// frame — a zero frame creates a 2×1 terminal that is corrected
|
||||||
|
// once the container gets its proper layout size.
|
||||||
|
let initialFrame = containerView.bounds.size.width >= 10
|
||||||
|
? containerView.bounds
|
||||||
|
: CGRect(x: 0, y: 0, width: 400, height: 300)
|
||||||
|
|
||||||
|
let view = LocalProcessTerminalView(frame: initialFrame)
|
||||||
view.autoresizingMask = [.width, .height]
|
view.autoresizingMask = [.width, .height]
|
||||||
|
|
||||||
// Apply font size from settings
|
// Apply all settings from Defaults
|
||||||
let fontSize = CGFloat(Defaults[.terminalFontSize])
|
applyAllSettings(to: view)
|
||||||
if let font = NSFont.monospacedSystemFont(ofSize: fontSize, weight: .regular) as NSFont? {
|
|
||||||
view.font = font
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply opacity
|
|
||||||
view.layer?.opacity = Float(Defaults[.terminalOpacity])
|
|
||||||
|
|
||||||
// Configure the dark terminal appearance
|
|
||||||
view.nativeBackgroundColor = .black
|
|
||||||
view.nativeForegroundColor = .white
|
|
||||||
|
|
||||||
view.processDelegate = delegate
|
view.processDelegate = delegate
|
||||||
|
|
||||||
|
|
@ -88,6 +130,12 @@ class TerminalManager: ObservableObject {
|
||||||
containerView.subviews.forEach { $0.removeFromSuperview() }
|
containerView.subviews.forEach { $0.removeFromSuperview() }
|
||||||
containerView.addSubview(view)
|
containerView.addSubview(view)
|
||||||
terminalView = view
|
terminalView = view
|
||||||
|
|
||||||
|
// If the container already has a valid size, snap the child to it.
|
||||||
|
let containerSize = containerView.bounds.size
|
||||||
|
if containerSize.width >= 10, containerSize.height >= 10 {
|
||||||
|
view.frame = containerView.bounds
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Starts the shell process if not already running.
|
/// Starts the shell process if not already running.
|
||||||
|
|
@ -112,6 +160,12 @@ class TerminalManager: ObservableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Restarts the shell by tearing down the old terminal and creating a fresh one.
|
/// Restarts the shell by tearing down the old terminal and creating a fresh one.
|
||||||
|
///
|
||||||
|
/// Instead of bumping a generation counter (which forced SwiftUI to destroy
|
||||||
|
/// and recreate the `NSViewRepresentable` — recycling the same `containerView`
|
||||||
|
/// across identities which broke layout), we simply nil out `terminalView`
|
||||||
|
/// and change `@Published` state. SwiftUI's `updateNSView` will fire,
|
||||||
|
/// see the nil terminal, and call `ensureTerminalView` to mount a new one.
|
||||||
func restartShell() {
|
func restartShell() {
|
||||||
// Terminate the running process gracefully
|
// Terminate the running process gracefully
|
||||||
terminalView?.terminate()
|
terminalView?.terminate()
|
||||||
|
|
@ -120,8 +174,6 @@ class TerminalManager: ObservableObject {
|
||||||
terminalView = nil
|
terminalView = nil
|
||||||
isProcessRunning = false
|
isProcessRunning = false
|
||||||
terminalTitle = "Terminal"
|
terminalTitle = "Terminal"
|
||||||
// Bump generation so the SwiftUI representable re-mounts
|
|
||||||
sessionGeneration += 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the terminal title from the shell escape sequence.
|
/// Updates the terminal title from the shell escape sequence.
|
||||||
|
|
@ -129,6 +181,42 @@ class TerminalManager: ObservableObject {
|
||||||
terminalTitle = title
|
terminalTitle = title
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Settings Application
|
||||||
|
|
||||||
|
/// Applies all persisted settings to a terminal view at creation time.
|
||||||
|
private func applyAllSettings(to view: LocalProcessTerminalView) {
|
||||||
|
// Font
|
||||||
|
let fontSize = CGFloat(Defaults[.terminalFontSize])
|
||||||
|
if let font = NSFont.monospacedSystemFont(ofSize: fontSize, weight: .regular) as NSFont? {
|
||||||
|
view.font = font
|
||||||
|
}
|
||||||
|
|
||||||
|
// Opacity
|
||||||
|
view.layer?.opacity = Float(Defaults[.terminalOpacity])
|
||||||
|
|
||||||
|
// Colors
|
||||||
|
view.nativeBackgroundColor = NSColor(Defaults[.terminalBackgroundColor])
|
||||||
|
view.nativeForegroundColor = NSColor(Defaults[.terminalForegroundColor])
|
||||||
|
view.caretColor = NSColor(Defaults[.terminalCursorColor])
|
||||||
|
|
||||||
|
// Cursor style
|
||||||
|
let cursorStyle = TerminalCursorStyleOption(rawValue: Defaults[.terminalCursorStyle])
|
||||||
|
?? .blinkBlock
|
||||||
|
view.getTerminal().options.cursorStyle = cursorStyle.swiftTermStyle
|
||||||
|
|
||||||
|
// Scrollback
|
||||||
|
let scrollback = Defaults[.terminalScrollbackLines]
|
||||||
|
view.getTerminal().buffer.changeHistorySize(scrollback)
|
||||||
|
view.getTerminal().options.scrollback = scrollback
|
||||||
|
|
||||||
|
// Input behavior
|
||||||
|
view.optionAsMetaKey = Defaults[.terminalOptionAsMeta]
|
||||||
|
view.allowMouseReporting = Defaults[.terminalMouseReporting]
|
||||||
|
|
||||||
|
// Rendering
|
||||||
|
view.useBrightColors = Defaults[.terminalBoldAsBright]
|
||||||
|
}
|
||||||
|
|
||||||
/// Updates font size on the live terminal view.
|
/// Updates font size on the live terminal view.
|
||||||
func applyFontSize(_ size: Double) {
|
func applyFontSize(_ size: Double) {
|
||||||
guard let view = terminalView else { return }
|
guard let view = terminalView else { return }
|
||||||
|
|
@ -143,6 +231,56 @@ class TerminalManager: ObservableObject {
|
||||||
view.layer?.opacity = Float(opacity)
|
view.layer?.opacity = Float(opacity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Updates cursor style on the live terminal view.
|
||||||
|
func applyCursorStyle(_ style: TerminalCursorStyleOption) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.getTerminal().options.cursorStyle = style.swiftTermStyle
|
||||||
|
view.setNeedsDisplay(view.bounds)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates scrollback buffer size on the live terminal view.
|
||||||
|
func applyScrollback(_ lines: Int) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.getTerminal().buffer.changeHistorySize(lines)
|
||||||
|
view.getTerminal().options.scrollback = lines
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates option-as-meta on the live terminal view.
|
||||||
|
func applyOptionAsMeta(_ enabled: Bool) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.optionAsMetaKey = enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates mouse reporting on the live terminal view.
|
||||||
|
func applyMouseReporting(_ enabled: Bool) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.allowMouseReporting = enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates bold-as-bright on the live terminal view.
|
||||||
|
func applyBoldAsBright(_ enabled: Bool) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.useBrightColors = enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates background color on the live terminal view.
|
||||||
|
func applyBackgroundColor(_ color: SwiftUI.Color) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.nativeBackgroundColor = NSColor(color)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates foreground color on the live terminal view.
|
||||||
|
func applyForegroundColor(_ color: SwiftUI.Color) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.nativeForegroundColor = NSColor(color)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates cursor color on the live terminal view.
|
||||||
|
func applyCursorColor(_ color: SwiftUI.Color) {
|
||||||
|
guard let view = terminalView else { return }
|
||||||
|
view.caretColor = NSColor(color)
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Environment
|
// MARK: - Environment
|
||||||
|
|
||||||
/// Builds the environment for the child shell process.
|
/// Builds the environment for the child shell process.
|
||||||
|
|
@ -155,3 +293,37 @@ class TerminalManager: ObservableObject {
|
||||||
return env.map { "\($0.key)=\($0.value)" }
|
return env.map { "\($0.key)=\($0.value)" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Cursor Style Bridge
|
||||||
|
|
||||||
|
/// Codable-friendly cursor style enum that bridges to SwiftTerm's `CursorStyle`.
|
||||||
|
enum TerminalCursorStyleOption: String, CaseIterable, Defaults.Serializable {
|
||||||
|
case blinkBlock = "blinkBlock"
|
||||||
|
case steadyBlock = "steadyBlock"
|
||||||
|
case blinkUnderline = "blinkUnderline"
|
||||||
|
case steadyUnderline = "steadyUnderline"
|
||||||
|
case blinkBar = "blinkBar"
|
||||||
|
case steadyBar = "steadyBar"
|
||||||
|
|
||||||
|
var swiftTermStyle: CursorStyle {
|
||||||
|
switch self {
|
||||||
|
case .blinkBlock: return .blinkBlock
|
||||||
|
case .steadyBlock: return .steadyBlock
|
||||||
|
case .blinkUnderline: return .blinkUnderline
|
||||||
|
case .steadyUnderline: return .steadyUnderline
|
||||||
|
case .blinkBar: return .blinkBar
|
||||||
|
case .steadyBar: return .steadyBar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var displayName: String {
|
||||||
|
switch self {
|
||||||
|
case .blinkBlock: return "Block (blinking)"
|
||||||
|
case .steadyBlock: return "Block (steady)"
|
||||||
|
case .blinkUnderline: return "Underline (blinking)"
|
||||||
|
case .steadyUnderline: return "Underline (steady)"
|
||||||
|
case .blinkBar: return "Bar (blinking)"
|
||||||
|
case .steadyBar: return "Bar (steady)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -917,6 +917,14 @@ extension Defaults.Keys {
|
||||||
static let terminalFontSize = Key<Double>("terminalFontSize", default: 12.0)
|
static let terminalFontSize = Key<Double>("terminalFontSize", default: 12.0)
|
||||||
static let terminalOpacity = Key<Double>("terminalOpacity", default: 1.0)
|
static let terminalOpacity = Key<Double>("terminalOpacity", default: 1.0)
|
||||||
static let terminalMaxHeightFraction = Key<Double>("terminalMaxHeightFraction", default: 0.4)
|
static let terminalMaxHeightFraction = Key<Double>("terminalMaxHeightFraction", default: 0.4)
|
||||||
|
static let terminalCursorStyle = Key<String>("terminalCursorStyle", default: "blinkBlock")
|
||||||
|
static let terminalScrollbackLines = Key<Int>("terminalScrollbackLines", default: 1000)
|
||||||
|
static let terminalOptionAsMeta = Key<Bool>("terminalOptionAsMeta", default: true)
|
||||||
|
static let terminalMouseReporting = Key<Bool>("terminalMouseReporting", default: true)
|
||||||
|
static let terminalBoldAsBright = Key<Bool>("terminalBoldAsBright", default: true)
|
||||||
|
static let terminalBackgroundColor = Key<Color>("terminalBackgroundColor", default: .black)
|
||||||
|
static let terminalForegroundColor = Key<Color>("terminalForegroundColor", default: .white)
|
||||||
|
static let terminalCursorColor = Key<Color>("terminalCursorColor", default: Color(.selectedControlColor))
|
||||||
|
|
||||||
// MARK: Timer Feature
|
// MARK: Timer Feature
|
||||||
static let enableTimerFeature = Key<Bool>("enableTimerFeature", default: true)
|
static let enableTimerFeature = Key<Bool>("enableTimerFeature", default: true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue