diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig index 6bfcb0750..b88c5ce91 100644 --- a/src/apprt/gtk/Window.zig +++ b/src/apprt/gtk/Window.zig @@ -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); diff --git a/src/config/Config.zig b/src/config/Config.zig index a2f71c0c0..cc3ee0b38 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -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.