dotfiles/home/.bash_profile
Sarthak 7f41cf7a82 replace the old dotfiles with the sakura line rice
The bare $HOME repo is gone. This is now the rice: install.sh, rice-*
scripts in bin/, configs in home/ linked into $HOME, theme templates, st
and the particle wallpaper. Clone to ~/rice and run install.sh.
2026-09-14 19:44:44 +05:30

16 lines
659 B
Bash

# ~/.bash_profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
# Auto-start the graphical session, but ONLY in the exact situation where it is
# safe to do so. Any one of these guards failing leaves you at a normal shell.
# - not already inside X
# - not an SSH session (never hijack a remote login)
# - physically on VT 1
# - no Xorg already running for this user
# NOTE: deliberately NOT `exec startx`. If X dies or fails to start we fall back
# to an interactive shell on tty1 instead of a login loop.
if [[ -z "$DISPLAY" && -z "$SSH_CONNECTION" && "$XDG_VTNR" == "1" ]]; then
if ! pgrep -u "$USER" -x Xorg >/dev/null 2>&1; then
startx
fi
fi