fix: don't overwrite QT_QPA_PLATFORMTHEME

This lets you set QT_QPA_PLATFORMTHEME in ~/.profile if you need to.
This commit is contained in:
Adil Hanney 2026-03-11 00:45:10 +00:00 • committed by Ashley Wulber
parent 59b48b5b3b
commit af9aaf9c1a

View file

@ -39,8 +39,9 @@ export QT_ENABLE_HIGHDPI_SCALING=1
export DCONF_PROFILE=cosmic export DCONF_PROFILE=cosmic
# Set the QT platform theme to CuteCosmic. Fallback to qt6ct if CuteCosmic is not installed. # Set the QT platform theme to CuteCosmic. Fallback to qt6ct if CuteCosmic is not installed.
export QT_QPA_PLATFORMTHEME=cosmic if [ -z "$QT_QPA_PLATFORMTHEME" ]; then
for QT_PLUGIN_PATH in /usr/lib{*,/*}/qt6/plugins; do export QT_QPA_PLATFORMTHEME=cosmic
for QT_PLUGIN_PATH in /usr/lib{*,/*}/qt6/plugins; do
if [ -f "${QT_PLUGIN_PATH}/platformthemes/libcutecosmictheme.so" ]; then if [ -f "${QT_PLUGIN_PATH}/platformthemes/libcutecosmictheme.so" ]; then
# CuteCosmic found, no need for a fallback. # CuteCosmic found, no need for a fallback.
export QT_QPA_PLATFORMTHEME=cosmic export QT_QPA_PLATFORMTHEME=cosmic
@ -49,7 +50,8 @@ for QT_PLUGIN_PATH in /usr/lib{*,/*}/qt6/plugins; do
# Fallback to qt6ct, but keep looking for CuteCosmic. # Fallback to qt6ct, but keep looking for CuteCosmic.
export QT_QPA_PLATFORMTHEME=qt6ct export QT_QPA_PLATFORMTHEME=qt6ct
fi fi
done done
fi
# Start gnome keyring components if the daemon is active # Start gnome keyring components if the daemon is active
# -> check if /run/user/$UID/keyring exists # -> check if /run/user/$UID/keyring exists