Variables d'environnement : utilisation de envvars.conf pour Sway (script maison)

fuz
Olivier DOSSMANN 2021-08-09 10:01:52 +02:00
parent ad2e5660dd
commit b70caa2bb8
2 changed files with 10 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# Active wayland pour Firefox
MOZ_ENABLE_WAYLAND=1
# Modifie le comportement JAVA pour PHPStorm
_JAVA_AWT_WM_NONREPARENTING=1

View File

@ -26,6 +26,13 @@ fi
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
case $HOST in
fuz | fuztest)
variables_file="${HOME}/.config/environment.d/envvars.conf"
if [[ -f "${variables_file}" ]]; then
# charge seulement les lignes sans "#" (non commentées)
for line in `cat "${variables_file}"|grep -Ev '^#'`; do
export "$line"
done
fi
exec sway
;;
*)
@ -33,3 +40,4 @@ if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
;;
esac
fi
# vim: ts=2 sw=2 et nu