mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00

Fixes #2781 This commit contains two separate changes but very related: 1. We update the color scheme state of the app on app start. This is necessary so that the configuration properly reflects the conditional state of the theme at the app level (i.e. the window headerbar). 2. We take ownership of the new config when it changes, matching macOS. This ensures that things like our GTK headerbar update when the theme changes but more generally whenever any config changes. And some housekeeping: - We remove runtime CSS setup from init. We can do it on the first tick of `run` instead. This will probably save some CPU cycles especially when we're just notifying a single instance to create a new window. - I moved dbus event setup to `run` as well. We don't need to know these events unless we're actually running the app. Similar to the above, should save some CPU time on single instance runs.