From f3cb95ac1f38575456fbd4b6c7b587e35ac5ea75 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sat, 4 Jan 2025 16:56:52 -0600 Subject: [PATCH] gtk: add `split-separator-color` config Fixes #4326 for GTK --- src/apprt/gtk/App.zig | 15 +++++++++++++++ src/config/Config.zig | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index 4e1e28ee6..e98c58089 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -996,6 +996,21 @@ fn loadRuntimeCss( unfocused_fill.b, }); + if (config.@"split-divider-color") |color| { + try writer.print( + \\.terminal-window .notebook separator {{ + \\ color: rgb({[r]d},{[g]d},{[b]d}); + \\ background: rgb({[r]d},{[g]d},{[b]d}); + \\}} + , + .{ + .r = color.r, + .g = color.g, + .b = color.b, + }, + ); + } + if (version.atLeast(4, 16, 0)) { switch (window_theme) { .ghostty => try writer.print( diff --git a/src/config/Config.zig b/src/config/Config.zig index 8283c2a22..cade03734 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -610,6 +610,10 @@ palette: Palette = .{}, /// Specified as either hex (`#RRGGBB` or `RRGGBB`) or a named X11 color. @"unfocused-split-fill": ?Color = null, +/// The color of the divider between splits. If unset the default system color +/// will be used. GTK only. +@"split-divider-color": ?Color = null, + /// The command to run, usually a shell. If this is not an absolute path, it'll /// be looked up in the `PATH`. If this is not set, a default will be looked up /// from your system. The rules for the default lookup are: