config: make the proxy icon documentation more detailed

This commit is contained in:
Mitchell Hashimoto
2024-10-24 20:56:33 -07:00
parent e11fb62627
commit 495925355a
2 changed files with 17 additions and 6 deletions

View File

@@ -229,15 +229,15 @@ extension Ghostty {
return String(cString: ptr)
}
var macosTitlebarProxyIcon: Ghostty.MacOSTitlebarProxyIcon {
let defaultValue = Ghostty.MacOSTitlebarProxyIcon.visible
var macosTitlebarProxyIcon: MacOSTitlebarProxyIcon {
let defaultValue = MacOSTitlebarProxyIcon.visible
guard let config = self.config else { return defaultValue }
var v: UnsafePointer<Int8>? = nil
let key = "macos-titlebar-proxy-icon"
guard ghostty_config_get(config, &v, key, UInt(key.count)) else { return defaultValue }
guard let ptr = v else { return defaultValue }
let str = String(cString: ptr)
return Ghostty.MacOSTitlebarProxyIcon(rawValue: str) ?? defaultValue
return MacOSTitlebarProxyIcon(rawValue: str) ?? defaultValue
}
var macosWindowShadow: Bool {