Skip to main content
Version: 0.3.3

libadwaita

Generates a per-user CSS override for libadwaita — the design library used by modern GNOME apps (Files, Text Editor, Calculator, Console, Settings, and most third-party apps that follow the GNOME HIG). The file sets the libadwaita named-colour CSS custom properties (--window-bg-color, --accent-bg-color, --sidebar-bg-color, --card-bg-color, etc.) so the app palette tracks tinct's colours.

For traditional non-libadwaita GTK 4 apps, use the gtk4 plugin instead — it writes a different file into the same directory.

Installation

Built into tinct — nothing to install separately. tinct generate -o libadwaita works out of the box.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o libadwaita

Generated files

FilePathRole
tinct-libadwaita.css~/.config/gtk-4.0/tinct-libadwaita.csslibadwaita named-colour overrides (:root CSS custom properties)

Integration

Libadwaita reads its user overrides from ~/.config/gtk-4.0/gtk.css (it shares this file with GTK 4). The plugin's PostExecute checks for the import line; if it isn't there, it prints a banner with the exact text to add. The plugin never edits gtk.css itself — that file belongs to the user.

/* ~/.config/gtk-4.0/gtk.css */
@import url("tinct-libadwaita.css");

If you also use the gtk4 plugin, you'll have two @import lines (order doesn't matter — they define disjoint sets of variables):

@import url("tinct-gtk4.css");
@import url("tinct-libadwaita.css");

System-wide recolouring: libadwaita apps only honour the user gtk.css when the ADW_DEBUG_HC / accent-colour recolouring path is in effect. Recent libadwaita (1.4+) reads the named-colour overrides directly; older versions may need GTK_THEME=Adwaita:dark or similar to pick them up.

Reload behaviour

Automatic

None at the plugin level. However, libadwaita 1.4+ ships a small live-update feature: it watches ~/.config/gtk-4.0/gtk.css and reloads the named-colour palette in already-running apps when the file changes. This means already-open libadwaita apps may pick up the new palette without a restart, but only if your libadwaita version supports it. Behaviour is per-app and not guaranteed.

Manual fallback

Close and reopen the libadwaita application to pick up the new palette deterministically.

Uninstall / revert

  1. Remove the include line from ~/.config/gtk-4.0/gtk.css:

    sed -i '/@import url("tinct-libadwaita.css")/d' ~/.config/gtk-4.0/gtk.css

    If gtk.css is now empty, delete it.

  2. Delete the generated file:

    rm ~/.config/gtk-4.0/tinct-libadwaita.css
  3. Reload to drop the theme — close and reopen each libadwaita app. With libadwaita 1.4+, removing the import line and saving gtk.css may revert running apps automatically.

  4. External state: this plugin only writes to ~/.config/gtk-4.0/. No further cleanup is required. (Note: the gtk4 plugin also writes into ~/.config/gtk-4.0/; if you have both, run their uninstalls separately.)

Flags

FlagDefaultDescription
--libadwaita.output-dir~/.config/gtk-4.0Override the output directory

Colour role mapping

CSS custom propertyTinct role
--window-bg-color / --view-bg-color / --card-bg-color / --dialog-bg-color / --popover-bg-color / --thumbnail-bg-colorbackground
--window-fg-color / --view-fg-color / --card-fg-color / --dialog-fg-color / --popover-fg-color / --thumbnail-fg-colorforeground
--headerbar-bg-color / --headerbar-backdrop-color / --secondary-sidebar-bg-color / --secondary-sidebar-backdrop-colorsurface
--headerbar-fg-color / --secondary-sidebar-fg-coloronSurface
--headerbar-border-color / --secondary-sidebar-border-colorborder
--sidebar-bg-color / --sidebar-backdrop-colorsurfaceVariant
--sidebar-fg-coloronSurfaceVariant
--sidebar-border-colorborder
--accent-bg-color / --accent-coloraccent1
--accent-fg-coloronAccent1
--destructive-bg-color / --destructive-color / --error-bg-color / --error-colordanger
--destructive-fg-color / --error-fg-coloronDanger
--success-bg-color / --success-colorsuccess
--success-fg-coloronSuccess
--warning-bg-color / --warning-colorwarning
--warning-fg-coloronWarning
--headerbar-shade-color / --sidebar-shade-color / --secondary-sidebar-shade-color / --card-shade-color / --popover-shade-color / --shade-color / --scrollbar-outline-colorstatic rgba(0, 0, 0, …) (not a tinct role)

Customising the template

tinct plugins templates dump -o libadwaita -l ~/.config/tinct/templates/libadwaita

This creates ~/.config/tinct/templates/libadwaita/tinct-libadwaita.css.tmpl. Tinct uses your version in preference to the embedded default.

See the templating reference for the available functions and palette accessors.

Troubleshooting

Plugin printed Libadwaita Theme Configuration Required banner

PostExecute looked at ~/.config/gtk-4.0/gtk.css and didn't find @import url("tinct-libadwaita.css"). Add it as shown in Integration, then re-run.

Theme generates but my apps look unchanged

Older libadwaita (≤ 1.3) ignores the named-colour CSS custom properties tinct sets; only the system accent colour is honoured. Check your version:

pkg-config --modversion libadwaita-1

If you're on a recent version and apps still look unchanged, the app may be a non-libadwaita GTK 4 app — try the gtk4 plugin instead.

Flatpak apps don't pick up the theme

Flatpak GNOME apps don't read host ~/.config/gtk-4.0 by default. Grant access:

flatpak override --user --filesystem=~/.config/gtk-4.0:ro

Some apps further sandbox themselves and ignore even this — there is no general workaround besides running the app natively.

Plugin skipped: ~/.config/gtk-4.0 does not exist

Hooks.RequiredDirs requires ~/.config/gtk-4.0 to already exist (taken as a signal that the GTK 4 / libadwaita stack is installed). Create it: mkdir -p ~/.config/gtk-4.0 and re-run.

  • gtk4 — companion plugin for traditional GTK 4 apps; writes a different file in the same ~/.config/gtk-4.0/ directory.
  • gtk3 — sibling plugin for legacy GTK 3 apps.
  • gnome-shell — themes the GNOME compositor itself.