mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-07 03:48:21 +00:00
config: quick terminal auto hide
Introduce a setting allowing to customize the behavior of the quick terminal when it loses focus. By default, the quick terminal will automatically hide. However, you can now configure it to remain open by setting `quick-terminal-autohide: false`. Resolves #2558
This commit is contained in:

committed by
Damien Mehala

parent
dd6460bc77
commit
196af6f2ca
@@ -107,7 +107,9 @@ class QuickTerminalController: BaseTerminalController {
|
||||
self.previousApp = nil
|
||||
}
|
||||
|
||||
animateOut()
|
||||
if (derivedConfig.quickTerminalAutoHide) {
|
||||
animateOut()
|
||||
}
|
||||
}
|
||||
|
||||
func windowWillResize(_ sender: NSWindow, to frameSize: NSSize) -> NSSize {
|
||||
@@ -395,15 +397,18 @@ class QuickTerminalController: BaseTerminalController {
|
||||
private struct DerivedConfig {
|
||||
let quickTerminalScreen: QuickTerminalScreen
|
||||
let quickTerminalAnimationDuration: Double
|
||||
let quickTerminalAutoHide: Bool
|
||||
|
||||
init() {
|
||||
self.quickTerminalScreen = .main
|
||||
self.quickTerminalAnimationDuration = 0.2
|
||||
self.quickTerminalAutoHide = true
|
||||
}
|
||||
|
||||
init(_ config: Ghostty.Config) {
|
||||
self.quickTerminalScreen = config.quickTerminalScreen
|
||||
self.quickTerminalAnimationDuration = config.quickTerminalAnimationDuration
|
||||
self.quickTerminalAutoHide = config.quickTerminalAutoHide
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user