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 <noreply@anthropic.com>
This commit is contained in:
Fabio Scotto di Santolo
2026-05-17 08:11:41 +02:00
parent d9e71c635d
commit 0202afd793
2 changed files with 12 additions and 1 deletions

View File

@@ -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:

View File

@@ -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