Merge pull request #1837 from ghostty-org/titlebar-style

macos: macos-titlebar-style, remove titlebar-tabs option
This commit is contained in:
Mitchell Hashimoto
2024-06-07 13:15:14 -07:00
committed by GitHub
4 changed files with 47 additions and 30 deletions

View File

@@ -228,12 +228,14 @@ extension Ghostty {
return String(cString: ptr)
}
var macosTitlebarTabs: Bool {
guard let config = self.config else { return false }
var v = false;
let key = "macos-titlebar-tabs"
_ = ghostty_config_get(config, &v, key, UInt(key.count))
return v
var macosTitlebarStyle: String {
let defaultValue = "transparent"
guard let config = self.config else { return defaultValue }
var v: UnsafePointer<Int8>? = nil
let key = "macos-titlebar-style"
guard ghostty_config_get(config, &v, key, UInt(key.count)) else { return defaultValue }
guard let ptr = v else { return defaultValue }
return String(cString: ptr)
}
var macosWindowShadow: Bool {