From 39e94ed49089fc1e1cd04bf1cd16ac0f02dca846 Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Sun, 17 May 2026 08:11:41 +0200 Subject: [PATCH] desktop_common: make Qt apps follow the GTK theme Deploy /etc/profile.d/10-qt-theme.sh setting QT_QPA_PLATFORMTHEME=gtk3 system-wide. The gtk3 Qt platform theme plugin (already shipped with qt5/qt6 base on Void) makes both Qt5 and Qt6 widgets read theme name, font, icon theme and color scheme from ~/.config/gtk-3.0/settings.ini, so Qt apps now match the Yaru-blue-dark setup on both i3 and sway. Also drop the stale QT_QPA_PLATFORMTHEME=qt6ct override in nymph's session-env (qt6ct is not installed and the override would shadow the global gtk3 setting). Co-Authored-By: Claude Opus 4.7 --- ansible/roles/profile_desktop_common/tasks/main.yml | 12 ++++++++++++ dotfiles/nymph/.config/sway/session-env | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ansible/roles/profile_desktop_common/tasks/main.yml b/ansible/roles/profile_desktop_common/tasks/main.yml index 91b0d24..fc50967 100644 --- a/ansible/roles/profile_desktop_common/tasks/main.yml +++ b/ansible/roles/profile_desktop_common/tasks/main.yml @@ -434,6 +434,18 @@ - "{{ user_home }}/Maildir/iCloudAccount" - "{{ user_home }}/Maildir/ProtonMailAccount" +- name: Make Qt apps follow the GTK theme + tags: [theme] + ansible.builtin.copy: + dest: /etc/profile.d/10-qt-theme.sh + content: | + # Use the gtk3 Qt platform theme so Qt5/Qt6 widgets, file dialogs, + # icon theme and color scheme follow ~/.config/gtk-3.0/settings.ini. + export QT_QPA_PLATFORMTHEME=gtk3 + owner: root + group: root + mode: "0644" + - name: Ensure flathub remote is configured tags: [packages] community.general.flatpak_remote: diff --git a/dotfiles/nymph/.config/sway/session-env b/dotfiles/nymph/.config/sway/session-env index 4a16e3a..c1c85f7 100644 --- a/dotfiles/nymph/.config/sway/session-env +++ b/dotfiles/nymph/.config/sway/session-env @@ -1,6 +1,5 @@ export LIBVA_DRIVER_NAME=iHD export QT_QPA_PLATFORM=wayland -export QT_QPA_PLATFORMTHEME=qt6ct export SWAY_UNSUPPORTED_GPU=1 export WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 export WLR_NO_HARDWARE_CURSORS=1