diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig index 3fe96a498..6e24c9468 100644 --- a/src/apprt/gtk/Window.zig +++ b/src/apprt/gtk/Window.zig @@ -112,7 +112,13 @@ pub fn init(self: *Window, app: *App) !void { const notebook_widget = c.gtk_notebook_new(); const notebook: *c.GtkNotebook = @ptrCast(notebook_widget); self.notebook = notebook; - c.gtk_notebook_set_tab_pos(notebook, c.GTK_POS_TOP); + const notebook_tab_pos: c_uint = switch (app.config.@"gtk-tabs-location") { + .top => c.GTK_POS_TOP, + .bottom => c.GTK_POS_BOTTOM, + .left => c.GTK_POS_LEFT, + .right => c.GTK_POS_RIGHT, + }; + c.gtk_notebook_set_tab_pos(notebook, notebook_tab_pos); c.gtk_notebook_set_scrollable(notebook, 1); c.gtk_notebook_set_show_tabs(notebook, 0); c.gtk_notebook_set_show_border(notebook, 0); diff --git a/src/config/Config.zig b/src/config/Config.zig index b9bac03e0..1f116ecad 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -949,6 +949,10 @@ keybind: Keybinds = .{}, /// so you can test single instance without conflicting with release builds. @"gtk-single-instance": GtkSingleInstance = .desktop, +/// Determines the side of the screen that the GTK tab bar will stick to. +/// Top, bottom, left, and right are supported. The default is top. +@"gtk-tabs-location": GtkTabsLocation = .top, + /// If `true` (default), then the Ghostty GTK tabs will be "wide." Wide tabs /// are the new typical Gnome style where tabs fill their available space. /// If you set this to `false` then tabs will only take up space they need, @@ -3378,6 +3382,14 @@ pub const GtkSingleInstance = enum { true, }; +/// See gtk-tabs-location +pub const GtkTabsLocation = enum { + top, + bottom, + left, + right, +}; + /// See mouse-shift-capture pub const MouseShiftCapture = enum { false,