From f6ee56d57435ad6b3e11c28ee81a41fffbeca03b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 11 Sep 2026 10:52:07 +0200 Subject: feat: unify Qt5, Qt6 and GTK on Macchiato with a lavender accent Installs the upstream Catppuccin Kvantum and GTK themes and points all four toolkits at them. Qt5 and Qt6 previously disagreed with each other as well as with the desktop: qt5ct carried a hand-rolled grey/purple palette and qt6ct used the stock darker.conf. Both now take their palette from Kvantum. Two things were not where they looked. GTK3's theme comes from gsettings on Wayland, not settings.ini, and gsettings was pinned to Breeze, which silently overrode the file; its icon-theme was likewise on breeze-dark while settings.ini said Material-Black-Plum-Suru. GTK4 ignores gtk-theme-name entirely, so its stylesheet is symlinked into ~/.config/gtk-4.0 instead. The accent is fixed rather than wallpaper-tracking, since Qt and GTK apps only reread a theme on restart. Lavender also replaces mauve as udt-accent's fallback so everything without a wallpaper-derived accent agrees. catppuccin/gtk is archived upstream. v1.0.3 works today but will not track future libadwaita changes; it is removable by deleting the directory. The tracked qt5ct/qt6ct files carry only the theme-relevant keys: the live files also hold an ignored_applications list of local paths. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq --- bin/udt-accent | 16 +++++++++------ templates/qt-gtk/README.md | 40 ++++++++++++++++++++++++++++++++++++++ templates/qt-gtk/gtk3-settings.ini | 21 ++++++++++++++++++++ templates/qt-gtk/gtk4-gtk.css | 10 ++++++++++ templates/qt-gtk/kvantum.kvconfig | 2 ++ templates/qt-gtk/qt5ct.conf | 12 ++++++++++++ templates/qt-gtk/qt6ct.conf | 13 +++++++++++++ 7 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 templates/qt-gtk/README.md create mode 100644 templates/qt-gtk/gtk3-settings.ini create mode 100644 templates/qt-gtk/gtk4-gtk.css create mode 100644 templates/qt-gtk/kvantum.kvconfig create mode 100644 templates/qt-gtk/qt5ct.conf create mode 100644 templates/qt-gtk/qt6ct.conf diff --git a/bin/udt-accent b/bin/udt-accent index 978f340..e88a512 100755 --- a/bin/udt-accent +++ b/bin/udt-accent @@ -19,12 +19,15 @@ import sys import tempfile from pathlib import Path -# The nine candidate accents. rosewater and flamingo are excluded as -# near-neutral tints that capture saturated inputs; maroon, sapphire and -# lavender are excluded as near-duplicate hues of red, sky and mauve. +# The candidate accents. rosewater and flamingo are excluded as near-neutral +# tints that capture saturated inputs, and maroon and sapphire as near-duplicate +# hues of red and sky. lavender sits close to mauve but is kept: it is the +# desktop-wide fallback, used by Qt, GTK and anything else that needs one fixed +# accent, so it has to be a value snap() can also return. ACCENTS = { - "pink": "#f5bde6", - "mauve": "#c6a0f6", + "pink": "#f5bde6", + "mauve": "#c6a0f6", + "lavender": "#b7bdf8", "red": "#ed8796", "peach": "#f5a97f", "yellow": "#eed49f", @@ -34,7 +37,7 @@ ACCENTS = { "blue": "#8aadf4", } -FALLBACK = "mauve" +FALLBACK = "lavender" MIN_CHROMA = 10.0 OUTPUT = Path.home() / ".cache" / "wal" / "udt-accent.rasi" @@ -226,6 +229,7 @@ def selftest(): # A near-grey has an unstable hue angle and must take the fallback. assert snap("#888888") == FALLBACK, snap("#888888") + assert FALLBACK in ACCENTS, FALLBACK # Border neighbours must be distinct from the accent and from each other, # or the gradient has nothing to animate between. diff --git a/templates/qt-gtk/README.md b/templates/qt-gtk/README.md new file mode 100644 index 0000000..c7c951b --- /dev/null +++ b/templates/qt-gtk/README.md @@ -0,0 +1,40 @@ +# Qt and GTK + +Catppuccin Macchiato with a **lavender** accent, fixed rather than +wallpaper-tracking: Qt and GTK apps only pick up a theme change when they +restart, so a moving accent would leave running apps disagreeing with new ones. + +Lavender is also `udt-accent`'s fallback, so anything without a wallpaper-derived +accent lands on the same colour. + +## Upstream themes + +Neither is generated by this repo; both are installed from upstream. + +| | Theme | Source | +| --- | --- | --- | +| Qt5 + Qt6 | `catppuccin-macchiato-lavender` | `catppuccin/Kvantum` | +| GTK3 + GTK4 | `catppuccin-macchiato-lavender-standard+default` | `catppuccin/gtk` v1.0.3 | + +`catppuccin/gtk` is **archived upstream**. v1.0.3 works and is what the +ecosystem uses, but it will not track future GTK4/libadwaita changes. Removing +it is just deleting the directory from `~/.themes`. + +## Wiring + +- **Qt5/Qt6**: `style=kvantum-dark` in both `qt5ct.conf` and `qt6ct.conf`, with + `custom_palette=false` so Kvantum supplies the palette. Previously the two + disagreed: qt5ct used a hand-rolled grey/purple scheme and qt6ct used + `/usr/share/qt6ct/colors/darker.conf`. +- **GTK3**: the theme name has to be set with **gsettings**, not just + `settings.ini`. On Wayland gsettings wins, and it was pinned to `Breeze`, + which silently overrode the file. `icon-theme` was likewise stuck on + `breeze-dark` while `settings.ini` said `Material-Black-Plum-Suru`. +- **GTK4**: libadwaita ignores `gtk-theme-name`, so `~/.config/gtk-4.0/theme` + is a symlink to the theme's `gtk-4.0` directory and `gtk.css` imports it. + +## Reproducing + + gsettings set org.gnome.desktop.interface gtk-theme 'catppuccin-macchiato-lavender-standard+default' + gsettings set org.gnome.desktop.interface icon-theme 'Material-Black-Plum-Suru' + gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' diff --git a/templates/qt-gtk/gtk3-settings.ini b/templates/qt-gtk/gtk3-settings.ini new file mode 100644 index 0000000..a35a2ea --- /dev/null +++ b/templates/qt-gtk/gtk3-settings.ini @@ -0,0 +1,21 @@ +[Settings] +gtk-application-prefer-dark-theme=true +gtk-button-images=1 +gtk-cursor-theme-name=Oxygen_Zion +gtk-cursor-theme-size=24 +gtk-decoration-layout=icon:minimize,maximize,close +gtk-enable-animations=true +gtk-font-name=Noto Sans, 10 +gtk-icon-theme-name=Material-Black-Plum-Suru +gtk-menu-images=1 +gtk-modules=colorreload-gtk-module:window-decorations-gtk-module +gtk-primary-button-warps-slider=false +gtk-theme-name=catppuccin-macchiato-lavender-standard+default +gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ +gtk-xft-dpi=98304 +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintmedium diff --git a/templates/qt-gtk/gtk4-gtk.css b/templates/qt-gtk/gtk4-gtk.css new file mode 100644 index 0000000..9bf52c0 --- /dev/null +++ b/templates/qt-gtk/gtk4-gtk.css @@ -0,0 +1,10 @@ +/* Catppuccin Macchiato (lavender) for GTK4 / libadwaita. + * libadwaita ignores gtk-theme-name, so the theme's own stylesheet is imported + * here instead. Assets are symlinked next to this file. */ +@import url("theme/gtk.css"); + +/* vte terminal: local override, kept from the previous config. */ +VteTerminal { + padding: 10px; + -VteTerminal-inner-border: 10px; +} diff --git a/templates/qt-gtk/kvantum.kvconfig b/templates/qt-gtk/kvantum.kvconfig new file mode 100644 index 0000000..aa0ae60 --- /dev/null +++ b/templates/qt-gtk/kvantum.kvconfig @@ -0,0 +1,2 @@ +[General] +theme=catppuccin-macchiato-lavender diff --git a/templates/qt-gtk/qt5ct.conf b/templates/qt-gtk/qt5ct.conf new file mode 100644 index 0000000..925d422 --- /dev/null +++ b/templates/qt-gtk/qt5ct.conf @@ -0,0 +1,12 @@ +# Theme-relevant keys only; the live file carries other settings. +[Appearance] +custom_palette=false +icon_theme=Material-Black-Plum-Suru +standard_dialogs=xdgdesktopportal +style=kvantum-dark +[Fonts] +fixed="Inconsolata Nerd Font Mono,14,-1,5,50,0,0,0,0,0" +general="Noto Sans,14,-1,5,50,0,0,0,0,0,Regular" +[Interface] +[SettingsWindow] +[Troubleshooting] diff --git a/templates/qt-gtk/qt6ct.conf b/templates/qt-gtk/qt6ct.conf new file mode 100644 index 0000000..b8b0054 --- /dev/null +++ b/templates/qt-gtk/qt6ct.conf @@ -0,0 +1,13 @@ +# Theme-relevant keys only; the live file carries other settings. +[Appearance] +custom_palette=false +icon_theme=Material-Black-Plum-Suru +standard_dialogs=xdgdesktopportal +style=kvantum-dark +[Fonts] +fixed="Inconsolata Nerd Font Mono,14,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,,0,0" +general="Noto Sans,14,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular,0,0" +[Interface] +[QSSEditor] +[SettingsWindow] +[Troubleshooting] -- cgit v1.2.3