Add settings shortcut on MacOS

- Settings shortcut opens the config file in the default editor.

Signed-off-by: Borja Clemente <borja.clemente@gmail.com>
This commit is contained in:
Borja Clemente
2023-12-17 14:22:38 +01:00
parent 5eea79ad0d
commit 646e3c365c
10 changed files with 104 additions and 2 deletions

View File

@@ -120,6 +120,12 @@ export fn ghostty_config_get_error(self: *Config, idx: u32) Error {
return .{ .message = err.message.ptr };
}
export fn ghostty_config_open() void {
Config.edit(global.alloc) catch |err| {
log.err("error opening config in editor err={}", .{err});
};
}
/// Sync with ghostty_error_s
const Error = extern struct {
message: [*:0]const u8 = "",