Skip to content

ghostty: set window-theme = ghostty in embedded config - #4098

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
segfawlt:fix/ghostty-window-theme
Nov 3, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
segfawlt:fix/ghostty-window-theme

Conversation

@segfawlt

@segfawlt segfawlt commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

When Ghostty runs in single-instance daemon mode, if the colorscheme is changed (Dark mode - Light mode switch, wallpaper switch) makes newly opened windows briefly flash the previous GTK window background color before the terminal surface renders after a theme switch. Setting window-theme = ghostty updates --window-bg-color directly from Ghostty's dankcolors background on SIGUSR2 reload so new windows open without flashing.

If we want existing installs covered automatically without manually editing ~/.config/ghostty/config, window-theme = ghostty also works inside quickshell/matugen/templates/ghostty.conf.)

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

This bug is actually a native Ghostty GTK daemon behavior: when running under gtk-single-instance=true with the default window-theme = auto, Ghostty updates the terminal surface on SIGUSR2 reload but leaves GTK's --window-bg-color untouched. Setting window-theme = ghostty ensures the GTK window container background updates dynamically to match the terminal palette on launch.

When upstream Ghostty fixes this, I don't think having that config in line breaks anything, the outcome is still preserved.

@github-actions github-actions Bot added core Go daemon and CLI under core/ fix labels Nov 3, 2026
@bbedward
bbedward merged commit 4430f77 into duxlabs-dev:master Nov 3, 2026
5 checks passed
purian23 pushed a commit that referenced this pull request Nov 3, 2026
@segfawlt
segfawlt deleted the fix/ghostty-window-theme branch November 4, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants