# Code common to all unburden-home-dir /etc/X11/Xsession.d/ files.

UNBURDEN_BASENAME=${UNBURDEN_BASENAME:-unburden-home-dir}

if [ -e /usr/pkg/etc/unburden-home-dir/"${UNBURDEN_BASENAME}".conf ]; then
    . /usr/pkg/etc/unburden-home-dir/"${UNBURDEN_BASENAME}".conf
fi

if [ -e "${HOME}/.${UNBURDEN_BASENAME}".conf ]; then
    . "${HOME}/.${UNBURDEN_BASENAME}".conf
fi

if [ -e "${XDG_CONFIG_HOME:-$HOME/.config}/${UNBURDEN_BASENAME}/config" ]; then
    . "${XDG_CONFIG_HOME:-$HOME/.config}/${UNBURDEN_BASENAME}/config"
fi

unburden_it() {
   [ "${UNBURDEN_HOME}" = "true" ] || [ "${UNBURDEN_HOME}" = "yes" ]
}

UNBURDEN_HOME_DIR_COMMON_SOURCED=yes
