From af9aaf9c1ae8b3eabd27cfe7629352e64b78fe3d Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Wed, 11 Mar 2026 00:45:10 +0000 Subject: [PATCH] fix: don't overwrite QT_QPA_PLATFORMTHEME This lets you set QT_QPA_PLATFORMTHEME in ~/.profile if you need to. --- data/start-cosmic | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/data/start-cosmic b/data/start-cosmic index e0104ed..5741630 100755 --- a/data/start-cosmic +++ b/data/start-cosmic @@ -39,17 +39,19 @@ 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 +if [ -z "$QT_QPA_PLATFORMTHEME" ]; then + 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 +fi # Start gnome keyring components if the daemon is active # -> check if /run/user/$UID/keyring exists