aboutsummaryrefslogtreecommitdiff
path: root/.bash_profile
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-05-12 04:30:57 -0400
committertdro <tdro@users.noreply.github.com>2020-05-12 04:30:57 -0400
commit487db8d659e82ecd51dfa12b9c8aacd447514387 (patch)
treebfa244e9d88141bd98dd3bce14f22177c0b2e447 /.bash_profile
parentbd97750a832e2961031cc7e966277a9332aea659 (diff)
downloaddotfiles-487db8d659e82ecd51dfa12b9c8aacd447514387.tar.gz
dotfiles-487db8d659e82ecd51dfa12b9c8aacd447514387.tar.bz2
dotfiles-487db8d659e82ecd51dfa12b9c8aacd447514387.zip
.bash_profile: Use xinit directly
Diffstat (limited to '.bash_profile')
-rw-r--r--.bash_profile7
1 files changed, 6 insertions, 1 deletions
diff --git a/.bash_profile b/.bash_profile
index d9e8999..43a6025 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1,13 +1,18 @@
#!/bin/bash
+# set xauthority path
+export XAUTHORITY=$HOME/.config/X11/Xauthority;
+
# auto login
-[ "$EUID" != 0 ] && [ -z "$DISPLAY" ] && [ "$(tty)" = '/dev/tty1' ] && exec startx >/dev/null 2>&1;
+[ "$EUID" != 0 ] && [ -z "$DISPLAY" ] && [ "$(tty)" = '/dev/tty1' ] \
+ && exec xinit "$HOME/.config/X11/xinitrc" -- :0 -logfile "$HOME/.cache/xorg.log" vt1 -keeptty -auth "$XAUTHORITY";
# set prompt
PS1_USER='$(E=$? && [ "$E" != 0 ] && echo "$E ")\[\e[0;34m\]\W\[\e[0m\] \[\e[0;34m\]\$\[\e[0m\] '
PS1_ROOT='$(E=$? && [ "$E" != 0 ] && echo "$E ")\[\e[0;31m\]\W\[\e[0m\] \[\e[0;31m\]\$\[\e[0m\] '
PS1_SSHD='$(E=$? && [ "$E" != 0 ] && echo "$E ")\[\e[0;32m\]\W\[\e[0m\] \[\e[0;32m\]\$\[\e[0m\] '
+# export prompt
[ "$EUID" != 0 ] && export PS1="$PS1_USER";
[ "$EUID" = 0 ] && export PS1="$PS1_ROOT";