org.gnome.desktop.interface/color-scheme
is the settings that GNOME uses to change the color scheme of GTK 4 apps themed with libadwaita.
Some GTK apps will not trigger theme change because they're sentitive to org.gnome.desktop.interface/gtk-theme
.
gtk_theme_sync_service.sh
is a service that ensure both settings are in sync.
org.gnome.desktop.interface/color-scheme
is the source of truth.
Works on Fedora Workstation 41 + GNOME 47 and Night Theme Switcher GNOME Extension
Workaround inspired by this proposal
Save gtk_theme_sync_service.sh
where it can then be accessible:
install -m 755 gtk_theme_sync_service.sh ${TARGET}/gtk_theme_sync_service
with ${TARGET}
choosen among:
- /opt
- /usr/local/bin
- ${HOME}/.local/bin
Edit and save the systemd unit file:
systemctl [--user] edit --full --force gtk_theme_sync.service
# ... copy/paste, adapt ExecStart then save
systemctl [--user] enable --now gtk_theme_sync.service
Note: use --user
if shellscript is installed under user's home directory
It's ready to rock!
systemctl [--user] edit --full gtk_theme_sync.service
Be sure to enable Adaptive on each theme (dark and light) and auto color scheme: