mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-01 15:38:35 +00:00
refactor: attempted autoupdate configuration
This commit is contained in:

committed by
Mitchell Hashimoto

parent
5e553f2743
commit
fd9d38481b
@@ -360,6 +360,17 @@ extension Ghostty {
|
||||
_ = ghostty_config_get(config, &v, key, UInt(key.count))
|
||||
return v;
|
||||
}
|
||||
|
||||
var autoUpdates: String {
|
||||
let defaultValue = "off"
|
||||
guard let config = self.config else { return defaultValue }
|
||||
let key = "auto-updates"
|
||||
|
||||
var value: UnsafePointer<Int8>? = nil
|
||||
guard ghostty_config_get(config, &value, key, UInt(key.count)) else { return defaultValue }
|
||||
guard let pointer = value else { return defaultValue }
|
||||
return String(cString: pointer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user