Skip to content

Commit

Permalink
apprt: add window-titlebar-{background,foreground} config options (#3806
Browse files Browse the repository at this point in the history
)

This gives people finer-grained control over the coloring of their
titlebars. Currently only implemented for GTK.
  • Loading branch information
mitchellh authored Dec 29, 2024
2 parents 6ca64bc + a92ed15 commit 579de8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apprt/gtk/App.zig
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ fn loadRuntimeCss(
const config: *const Config = &self.config;
const window_theme = config.@"window-theme";
const unfocused_fill: Config.Color = config.@"unfocused-split-fill" orelse config.background;
const headerbar_background = config.background;
const headerbar_foreground = config.foreground;
const headerbar_background = config.@"window-titlebar-background" orelse config.background;
const headerbar_foreground = config.@"window-titlebar-foreground" orelse config.foreground;

try writer.print(
\\widget.unfocused-split {{
Expand Down
10 changes: 10 additions & 0 deletions src/config/Config.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,16 @@ keybind: Keybinds = .{},
/// * `end` - Insert the new tab at the end of the tab list.
@"window-new-tab-position": WindowNewTabPosition = .current,

/// Background color for the window titlebar. This only takes effect if
/// window-theme is set to ghostty. Currently only supported in the GTK app
/// runtime.
@"window-titlebar-background": ?Color = null,

/// Foreground color for the window titlebar. This only takes effect if
/// window-theme is set to ghostty. Currently only supported in the GTK app
/// runtime.
@"window-titlebar-foreground": ?Color = null,

/// This controls when resize overlays are shown. Resize overlays are a
/// transient popup that shows the size of the terminal while the surfaces are
/// being resized. The possible options are:
Expand Down

0 comments on commit 579de8e

Please sign in to comment.