Skip to content

GTK

GTK apps (LibAdwaita, GTK3/4) do not read config files directly for theming. They rely on the DConf database (GNOME Settings Daemon). Changes must be made via gsettings commands or IPC calls. Persistence: Changes made via gsettings are written to disk (~/.config/dconf/user) and persist across reboots.

We use the Exec pattern. We run a series of gsettings commands to update the relevant keys in the DConf database. These changes apply immediately to running applications.

None. DConf is a system-level store (per user). No config file edits are required.

If this wasn’t built-in, a user would define it like this:

enroll:
gtk:
type: command # or 'script'
commands:
- "gsettings set org.gnome.desktop.interface gtk-theme '{{ preset.gtk_theme }}'"
- "gsettings set org.gnome.desktop.interface icon-theme '{{ preset.icon_theme }}'"
- "gsettings set org.gnome.desktop.interface cursor-theme '{{ preset.cursor_theme }}'"
- "gsettings set org.gnome.desktop.interface font-name '{{ preset.font_name }}'"
- "gsettings set org.gnome.desktop.interface color-scheme 'prefer-{{ mode }}'"
  • gtk_theme (e.g., “Adwaita”)
  • icon_theme
  • cursor_theme
  • font_name (e.g., “Cantarell 11”)
  • mode (light/dark)