mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
apprt/glfw: implement openconfig
This commit is contained in:
@ -20,6 +20,7 @@ const Renderer = renderer.Renderer;
|
|||||||
const apprt = @import("../apprt.zig");
|
const apprt = @import("../apprt.zig");
|
||||||
const CoreApp = @import("../App.zig");
|
const CoreApp = @import("../App.zig");
|
||||||
const CoreSurface = @import("../Surface.zig");
|
const CoreSurface = @import("../Surface.zig");
|
||||||
|
const configpkg = @import("../config.zig");
|
||||||
const Config = @import("../config.zig").Config;
|
const Config = @import("../config.zig").Config;
|
||||||
|
|
||||||
// Get native API access on certain platforms so we can do more customization.
|
// Get native API access on certain platforms so we can do more customization.
|
||||||
@ -127,6 +128,11 @@ pub const App = struct {
|
|||||||
glfw.postEmptyEvent();
|
glfw.postEmptyEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Open the configuration in the system editor.
|
||||||
|
pub fn openConfig(self: *App) !void {
|
||||||
|
try configpkg.edit.open(self.app.alloc);
|
||||||
|
}
|
||||||
|
|
||||||
/// Reload the configuration. This should return the new configuration.
|
/// Reload the configuration. This should return the new configuration.
|
||||||
/// The old value can be freed immediately at this point assuming a
|
/// The old value can be freed immediately at this point assuming a
|
||||||
/// successful return.
|
/// successful return.
|
||||||
|
Reference in New Issue
Block a user