Add quick-terminal-space-behavior option

This commit is contained in:
Soh Satoh
2024-12-31 21:55:03 +09:00
committed by Mitchell Hashimoto
parent 2206c509be
commit e2523c25cb
5 changed files with 106 additions and 2 deletions

View File

@@ -431,6 +431,16 @@ extension Ghostty {
_ = ghostty_config_get(config, &v, key, UInt(key.count))
return v
}
var quickTerminalSpaceBehavior: QuickTerminalSpaceBehavior {
guard let config = self.config else { return .move }
var v: UnsafePointer<Int8>? = nil
let key = "quick-terminal-space-behavior"
guard ghostty_config_get(config, &v, key, UInt(key.count)) else { return .move }
guard let ptr = v else { return .move }
let str = String(cString: ptr)
return QuickTerminalSpaceBehavior(fromGhosttyConfig: str) ?? .move
}
#endif
var resizeOverlay: ResizeOverlay {