4 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
39e94ed490 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>
2026-05-17 08:11:41 +02:00
Fabio Scotto di Santolo
a3df4b7962 desktop_common: drop inert Flatpak GTK_THEME override
The task wrote /etc/flatpak/overrides/global, but Flatpak reads its
overrides from /var/lib/flatpak/overrides/, so the file was never
honored. The dark theme is now correctly applied to Flatpak apps via
xdg-desktop-portal (color-scheme + gtk-theme), which works as long as
the portal backends can start — fixed in the prior commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 08:05:25 +02:00
Fabio Scotto di Santolo
b7c53378cd sway: propagate Wayland env to dbus for portal backends
Without dbus-update-activation-environment, xdg-desktop-portal-{gtk,wlr}
inherit an empty WAYLAND_DISPLAY/SWAYSOCK from the session bus (started
by dbus-run-session before sway) and crash on activation. As a result
Flatpak apps cannot read color-scheme / gtk-theme from the host and fall
back to a light theme.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 07:57:10 +02:00
Fabio Scotto di Santolo
e64028b77a Merge branch 'feature/migrate-wayland' 2026-05-17 00:09:01 +02:00
3 changed files with 15 additions and 23 deletions

View File

@@ -434,6 +434,18 @@
- "{{ user_home }}/Maildir/iCloudAccount" - "{{ user_home }}/Maildir/iCloudAccount"
- "{{ user_home }}/Maildir/ProtonMailAccount" - "{{ 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 - name: Ensure flathub remote is configured
tags: [packages] tags: [packages]
community.general.flatpak_remote: community.general.flatpak_remote:
@@ -464,28 +476,6 @@
- (desktop_flatpak_extensions | default([])) | length > 0 - (desktop_flatpak_extensions | default([])) | length > 0
- item | length > 0 - item | length > 0
- name: Ensure /etc/flatpak/overrides exists
tags: [packages, flatpak, theme]
ansible.builtin.file:
path: /etc/flatpak/overrides
state: directory
owner: root
group: root
mode: "0755"
when: (desktop_flatpak_packages | default([])) | length > 0
- name: Force dark GTK theme for Flatpak applications
tags: [packages, flatpak, theme]
ansible.builtin.copy:
dest: /etc/flatpak/overrides/global
content: |
[Environment]
GTK_THEME={{ desktop_flatpak_gtk_theme | default('Yaru-Blue-dark') }}
owner: root
group: root
mode: "0644"
when: (desktop_flatpak_packages | default([])) | length > 0
- name: Bootstrap rustup toolchain installer - name: Bootstrap rustup toolchain installer
tags: [packages] tags: [packages]
block: block:

View File

@@ -74,6 +74,9 @@ for_window [class="(?i)polkit"] floating enable
for_window [title="^Authentication Required"] floating enable for_window [title="^Authentication Required"] floating enable
# Autostart — XDG and session services # Autostart — XDG and session services
# Propagate Wayland env to dbus so xdg-desktop-portal backends inherit
# WAYLAND_DISPLAY/SWAYSOCK when dbus-activated (otherwise they crash).
exec dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP
exec dex --autostart --environment sway exec dex --autostart --environment sway
exec gnome-keyring-daemon --start --components=secrets exec gnome-keyring-daemon --start --components=secrets
exec_always ~/.config/sway/scripts/setup-gtk-theme.sh exec_always ~/.config/sway/scripts/setup-gtk-theme.sh

View File

@@ -1,6 +1,5 @@
export LIBVA_DRIVER_NAME=iHD export LIBVA_DRIVER_NAME=iHD
export QT_QPA_PLATFORM=wayland export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=qt6ct
export SWAY_UNSUPPORTED_GPU=1 export SWAY_UNSUPPORTED_GPU=1
export WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 export WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1
export WLR_NO_HARDWARE_CURSORS=1 export WLR_NO_HARDWARE_CURSORS=1