fix: use prefer-light and dconf for GTK4 color-scheme refresh (niri compatibility)#2141
fix: use prefer-light and dconf for GTK4 color-scheme refresh (niri compatibility)#2141auricom wants to merge 1 commit intoAvengeMedia:masterfrom
Conversation
Replace the intermediate 'default' toggle value with 'prefer-light' in refreshGTK4() and syncColorScheme() to avoid ambiguity on compositors like niri that don't treat 'default' the same as GNOME does. Switch color-scheme writes to use dconf as the primary method (falling back to gsettings), since dconf is more universally available and does not require GSettings schema setup. This improves compatibility with niri, NixOS, and other minimalistic environments where gsettings schemas may not be configured. Fixes: AvengeMedia#1643 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I was under the impression that prefer-light was more of a accessibility thing and the preferred preference for light mode was default, at least thats what I gained from yalter comments awhile back when we used to use prefer-light |
|
I'm using Automatic Color Mode based on Location on DMS, and it works well. Every night, DMS and system applications switch to dark mode, and it switches to light mode during the day as expected. However, my Flatpak applications (Zen, Vestkop, Zed, Vscode, Slack, etc...), all configured with themes synchronized with system, are staying in dark mode everytime. The fix I found is to manually launch I thought reading that comment that using Do you have an idea how I could manually trigger a script when DMS changes from dark to light ? I could fix this locally if upstream should stay like this. |
Fixes #2140
Summary
"default"with"prefer-light"as the intermediate toggle value inrefreshGTK4()— avoids ambiguity on compositors like niri wheredefaultmay not trigger a style reload"default"with"prefer-light"insyncColorScheme()for light mode — explicit value is safer across environmentsutils.DconfSet()which triesdconf writefirst (falling back togsettings), and use it for allcolor-schemewrites —dconfis more universal and does not require GSettings schema setup (niri, NixOS, minimal distros)Test plan
dconfis tried beforegsettingsforcolor-schemewrites🤖 Generated with Claude Code