feat(config): gtk add start maximized option

This commit is contained in:
Mário Victor Ribeiro Silva
2024-12-30 12:14:03 -03:00
parent 89e5ca2fb4
commit 2542752b06
2 changed files with 9 additions and 0 deletions

View File

@ -265,6 +265,8 @@ pub fn init(self: *Window, app: *App) !void {
c.gtk_popover_set_has_arrow(@ptrCast(@alignCast(self.context_menu)), 0);
c.gtk_widget_set_halign(self.context_menu, c.GTK_ALIGN_START);
if (app.config.@"gtk-maximize") c.gtk_window_maximize(self.window);
// If we are in fullscreen mode, new windows start fullscreen.
if (app.config.fullscreen) c.gtk_window_fullscreen(self.window);

View File

@ -1851,6 +1851,13 @@ keybind: Keybinds = .{},
/// must always be able to move themselves into an isolated cgroup.
@"linux-cgroup-hard-fail": bool = false,
/// Start new windows maximized. This setting applies to new windows and
/// does not apply to tabs, splits, etc. However, this setting will apply to all
/// new windows, not just the first one.
///
/// This setting is overwritten by `fullscreen` option.
@"gtk-maximize": bool = false,
/// If `true`, the Ghostty GTK application will run in single-instance mode:
/// each new `ghostty` process launched will result in a new window if there is
/// already a running process.