From 420cbc4a3477ed7befe64fc45663d994c42ea731 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Wed, 15 Mar 2023 00:02:26 -0400 Subject: [PATCH] Add test to check if .profile exists --- dot_bash_profile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dot_bash_profile b/dot_bash_profile index 13b41c3..c7c22af 100644 --- a/dot_bash_profile +++ b/dot_bash_profile @@ -1,10 +1,9 @@ # # ~/.bash_profile # -. ~/.profile +[[ -f ~/.profile ]] && . ~/.profile [[ -f ~/.bashrc ]] && . ~/.bashrc -if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then - exec startx -fi +[[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 ]] && exec startx +