summaryrefslogblamecommitdiff
path: root/roles/shell/bash/templates/bash_profile.j2
blob: f622f67556e1e684cac7b5b17b0289de639ed5b6 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                                 

                                                                                                      
 
                                                                       

                                                    
                                                                                             
                                                                                       


                                                                             
# 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 $XDG_CONFIG_HOME/bash/bashrc ]] && . $XDG_CONFIG_HOME/bash/bashrc
{% if "graphical_vt" in features.get(profile, []) %}

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 %}