aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bash_profile9
-rw-r--r--.bashrc2
2 files changed, 7 insertions, 4 deletions
diff --git a/.bash_profile b/.bash_profile
index ea406fd..d8acd79 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1,11 +1,11 @@
#!/bin/bash
# auto login
-[ "$EUID" -ne 0 ] && [ -z "$DISPLAY" ] && [ "$(tty)" = '/dev/tty1' ] && exec startx >/dev/null 2>&1;
+[ "$EUID" != 0 ] && [ -z "$DISPLAY" ] && [ "$(tty)" = '/dev/tty1' ] && exec startx >/dev/null 2>&1;
# set prompt
-[ "$EUID" -ne 0 ] && export PS1='\[\e[0;34m\]\W \$\[\e[0m\] ';
-[ "$EUID" -eq 0 ] && export PS1='\[\e[1;31m\]\W \$\[\e[0m\] ';
+[ "$EUID" != 0 ] && export PS1='\[\e[0;34m\]\W \$\[\e[0m\] ';
+[ "$EUID" = 0 ] && export PS1='\[\e[1;31m\]\W \$\[\e[0m\] ';
# ssh set prompt
[ -n "$SSH_CLIENT" ] && [ "$EUID" -ne 0 ] && export PS1='\[\e[1;32m\]\W \$\[\e[0m\] ';
@@ -34,3 +34,6 @@ export FZF_DEFAULT_OPTS="--color=fg:255,hl:9 \
# source frequently changed files
. /etc/profile.d/theme.sh
+
+# source bashrc
+[ -z "$DISPLAY" ] && . "$HOME/.bashrc"
diff --git a/.bashrc b/.bashrc
index 30b0a0a..5a7ab73 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,7 +1,7 @@
#!/bin/bash
# source exports
-. "$HOME/.bash_profile"
+[ -z "$DISPLAY" ] || . "$HOME/.bash_profile"
# bail if not interactive
[[ $- != *i* ]] && return;