X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=roles%2Fshell%2Fbash%2Ftemplates%2Fbash_profile.j2;h=f622f67556e1e684cac7b5b17b0289de639ed5b6;hb=44c40b43e46ce0fcf3e2e31fde8f27666bbd3807;hp=06210fabb3c99331003b3ea613e6a40a8ea3c32b;hpb=397c4fed757d201af627636822981e85e84ea572;p=perso%2FImmae%2FConfig%2FAnsible.git diff --git a/roles/shell/bash/templates/bash_profile.j2 b/roles/shell/bash/templates/bash_profile.j2 index 06210fa..f622f67 100644 --- a/roles/shell/bash/templates/bash_profile.j2 +++ b/roles/shell/bash/templates/bash_profile.j2 @@ -1,9 +1,12 @@ # Some variables are loaded via pam (see .config/pam_environment) +# This file is loaded thanks to as line in /etc/profile +# test "$BASH" && test -r "$XDG_CONFIG_HOME/bash/bash_profile" && . $XDG_CONFIG_HOME/bash/bash_profile -[[ -f ~/.bashrc ]] && . ~/.bashrc +[[ -f $XDG_CONFIG_HOME/bash/bashrc ]] && . $XDG_CONFIG_HOME/bash/bashrc {% if "graphical_vt" in features.get(profile, []) %} -if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then +if [[ ! $DISPLAY && $XDG_VTNR -eq {{ lookup('env', "XDG_VTNR") | default(1, true) }} ]]; then + [[ -f "$XDG_STATE_HOME/bash/bashrc_temp" ]] && rm -f $XDG_STATE_HOME/bash/bashrc_temp exec startx $XDG_CONFIG_HOME/xinitrc > $XDG_STATE_HOME/xsession_errors 2>&1 fi {% endif %}