summaryrefslogblamecommitdiff
path: root/roles/shell/bash/templates/bash_profile.j2
blob: 5be21a9a2e3cebd458b50cbab5862f705fba85c1 (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

# Loaded by /etc/profile already
# [[ -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 %}