fix(sway): Load .config/environment.d/envvars.conf in another way

This commit is contained in:
2025-01-10 18:41:18 +01:00
parent 1b5f93a3ec
commit aacb06b728
2 changed files with 15 additions and 0 deletions

View File

@@ -11,5 +11,18 @@ emulate sh -c '. ~/.profile'
# Start X automatically
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
case $HOST in
roc | zou)
: # Exceptions : On ne fait rien pour ces machines qui sont sous Xorg.
;;
*)
# Pour toutes les autres on charge le contenu de .config/environment.d
# Cf. https://wiki.archlinux.org/title/Environment_variables#Per_Wayland_session
# use systemd-environment-d-generator(8) to generate environment, and export those variables
set -o allexport
source <(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)
set +o allexport
;;
esac
exec sway
fi