[sh] Fix XDG_SESSION stuff.

This commit is contained in:
Yushun Cheng 2022-04-05 18:19:03 +08:00
parent a2213fa47f
commit a38fb8a21e
5 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1 @@
if test -n ${XDG_SESSION_DESKTOP} ||
test -n ${XDG_SESSION_CLASS} ||
test -n ${XDG_SESSION_TYPE}; then
. "$XDG_CONFIG_HOME/xdgrc.sh"
fi
. "$XDG_CONFIG_HOME/xdgrc.sh"

View File

@ -1 +1,4 @@
export MOZ_ENABLE_WAYLAND=1
case ${XDG_SESSION_TYPE} in
'wayland' ) export MOZ_ENABLE_WAYLAND=1 ;;
* )
esac

View File

@ -1 +1,4 @@
GDK_BACKEND=wayland
case ${XDG_SESSION_TYPE} in
'wayland' ) GDK_BACKEND=wayland ;;
* )
esac

View File

@ -1,2 +1,6 @@
export QT_QPA_PLATFORMTHEME=gtk3
export QT_QPA_PLATFORM=wayland
case ${XDG_SESSION_TYPE} in
'wayland' ) export QT_QPA_PLATFORM=wayland ;;
* )
esac

View File

@ -7,7 +7,7 @@ test -n "$XDG_CONFIG_HOME" || export XDG_CONFIG_HOME="$HOME/.config"
# Source profiles.
XDGRC_DIR=${XDG_CONFIG_HOME}'/xdgrc.d'
if test -d ${XDGRC_DIR}; then
for profile in ${XDGRC_DIR}'/*.sh'; do
for profile in ${XDGRC_DIR}'/'*'.sh'; do
. ${profile}
done
fi