# This file is sourced by Xsession(5), not executed.
# Select unity profile if we are in the default session.
# The default profile is used otherwise.

if [ "x$DESKTOP_SESSION" = "xmate" -o "x$XDG_SESSION_DESKTOP" = "xmate" ]; then
    COMPIZ_CONFIG_PROFILE="mate"
    export COMPIZ_CONFIG_PROFILE
elif [ "x$DESKTOP_SESSION" = "xlightdm-xsession" ]; then
    # Let's look at the preferred x session manager:
    value=$(update-alternatives --query x-session-manager 2>/dev/null | awk '/^Value: / {print $2}')
    if [ "x$value" = "x/usr/bin/mate-session" ]; then
        COMPIZ_CONFIG_PROFILE="mate"
        export COMPIZ_CONFIG_PROFILE
    fi
fi

