diff options
Diffstat (limited to 'config/hypr/scripts/Polkit.sh')
| -rwxr-xr-x | config/hypr/scripts/Polkit.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/config/hypr/scripts/Polkit.sh b/config/hypr/scripts/Polkit.sh index 768747ab..f09c9e1f 100755 --- a/config/hypr/scripts/Polkit.sh +++ b/config/hypr/scripts/Polkit.sh @@ -21,12 +21,23 @@ fi if [ -z "${QT_QUICK_CONTROLS_STYLE:-}" ]; then export QT_QUICK_CONTROLS_STYLE=Basic fi -if [ -z "${QT_STYLE_OVERRIDE:-}" ]; then + +# Check if kvantum is specified globally but the QML module is missing +if [[ "${QT_STYLE_OVERRIDE:-}" == "kvantum" ]] || [[ "${QT_STYLE_OVERRIDE:-}" == "kvantum-dark" ]]; then + # Check common Qt5/Qt6 QML directories for the Kvantum module + if ! find /usr/lib /usr/lib64 /usr/share -type d -path "*/qml/*/kvantum" -print -quit 2>/dev/null | grep -q .; then + echo "Kvantum QML module not found. Overriding QT_STYLE_OVERRIDE for Polkit to prevent crash." + export QT_STYLE_OVERRIDE=Fusion + fi +elif [ -z "${QT_STYLE_OVERRIDE:-}" ]; then export QT_STYLE_OVERRIDE=Fusion fi # List of potential Polkit agent file paths (preferred order) polkit=( + "/usr/libexec/hyprpolkitagent" + "/usr/lib/hyprpolkitagent" + "/usr/lib/hyprpolkitagent/hyprpolkitagent" "/usr/bin/xfce-polkit" "/usr/lib/xfce4/polkit-agent/xfce-polkit" "/usr/libexec/xfce-polkit" @@ -39,9 +50,6 @@ polkit=( "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" "/usr/lib/polkit-kde-authentication-agent-1" "/usr/libexec/polkit-kde-authentication-agent-1" - "/usr/libexec/hyprpolkitagent" - "/usr/lib/hyprpolkitagent" - "/usr/lib/hyprpolkitagent/hyprpolkitagent" ) executed=false |
