From 618624bcc0d06fe223f9c71727826d73a9b61d03 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Fri, 20 Feb 2026 20:36:45 +0000 Subject: [PATCH] feat: enable cutecosmic or qt6ct with QT_QPA_PLATFORMTHEME --- data/start-cosmic | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/data/start-cosmic b/data/start-cosmic index 6e05738..a947e16 100755 --- a/data/start-cosmic +++ b/data/start-cosmic @@ -38,6 +38,19 @@ export QT_AUTO_SCREEN_SCALE_FACTOR=1 export QT_ENABLE_HIGHDPI_SCALING=1 export DCONF_PROFILE=cosmic +# Set the QT platform theme to CuteCosmic. Fallback to qt6ct if CuteCosmic is not installed. +export QT_QPA_PLATFORMTHEME=cosmic +for QT_PLUGIN_PATH in /usr/lib{*,/*}/qt6/plugins; do + if [ -f "${QT_PLUGIN_PATH}/platformthemes/libcutecosmictheme.so" ]; then + # CuteCosmic found, no need for a fallback. + export QT_QPA_PLATFORMTHEME=cosmic + break + elif [ -f "${QT_PLUGIN_PATH}/platformthemes/libqt6ct.so" ]; then + # Fallback to qt6ct, but keep looking for CuteCosmic. + export QT_QPA_PLATFORMTHEME=qt6ct + fi +done + # Start gnome keyring components if the daemon is active # -> check if /run/user/$UID/keyring exists if [ -d "/run/user/$(id -u)/keyring" ]; then