fix(sway): Load .config/environment.d/envvars.conf in another way
This commit is contained in:
@ -10,6 +10,8 @@ ELECTRON_OZONE_PLATFORM_HINT=wayland
|
||||
# Pour wayland
|
||||
SDL_VIDEODRIVER=wayland
|
||||
# Session : déjà fait par sway-systemd. Cf. https://github.com/alebastr/sway-systemd/blob/main/src/session.sh
|
||||
# Regarder dans .config/sway/config, à la fin ça importe /etc/sway/config.d/ qui contient 10-systemd-session.conf qui exécute session.sh
|
||||
# Ce qui import XDG_SESSION_TYPE, XDG_SESSION_DESKTOP, XDG_CURRENT_DESKTOP, etc.
|
||||
#export XDG_SESSION_TYPE=wayland
|
||||
#export XDG_SESSION_DESKTOP=sway
|
||||
# gammastep-indicator n'est plus utilisé dans mon Wayland
|
||||
|
@ -226,6 +226,7 @@ bar 1 {
|
||||
}
|
||||
}
|
||||
|
||||
# Va lancer notamment session.sh pour les variables XDG_SESSION et touti quanti
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
# Ajout pour Olivier
|
||||
|
@ -1,10 +1,28 @@
|
||||
# .profile permet d'avoir
|
||||
# 1. TERMINAL (choix d'un terminal par défaut)
|
||||
# 2. BATPATH (pour la batterie)
|
||||
# 3. PATH initial # TODO: vraiment nécessaire ?
|
||||
emulate sh -c '. ~/.profile'
|
||||
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init --path)"
|
||||
# TODO: vérifier si ce code commenté fonctionne
|
||||
#export PYENV_ROOT="$HOME/.pyenv"
|
||||
#export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
#eval "$(pyenv init --path)"
|
||||
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user