aboutsummaryrefslogtreecommitdiffstats
path: root/_zlogin
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-01-31 14:07:34 +0800
committerAaron LI <aaronly.me@gmail.com>2016-01-31 14:07:34 +0800
commitb8100b88c4fa4edacd6bf3e34074ab8678a44f1c (patch)
tree0840d3e27a3f26c3ab51e3e1cc7c953865e418e8 /_zlogin
parent9b472f58253cf3ff9f4df8308d3aa552aaa51227 (diff)
downloaddotfiles-b8100b88c4fa4edacd6bf3e34074ab8678a44f1c.tar.bz2
Tune zsh configs; Auto startx if login on tty6 (.zlogin)
Diffstat (limited to '_zlogin')
-rw-r--r--_zlogin22
1 files changed, 22 insertions, 0 deletions
diff --git a/_zlogin b/_zlogin
new file mode 100644
index 0000000..8220a9e
--- /dev/null
+++ b/_zlogin
@@ -0,0 +1,22 @@
+#
+# ~/.zlogin
+# *finally* executed by a *login* zsh shell
+# see man zsh(1)
+#
+# Credits:
+# [1] Gentoo Wiki - X without Display Manager
+# https://wiki.gentoo.org/wiki/X_without_Display_Manager
+#
+# Aaron LI
+# 2016-01-31
+#
+
+## Auto startx if login on tty6
+if (( $EUID != 0 )) && [[ -z $DISPLAY ]] && [[ $TTY = "/dev/tty6" ]]; then
+ if [ -e ~/.xsession-errors ]; then
+ mv -f ~/.xsession-errors ~/.xsession-errors.old
+ fi
+ exec startx ~/.xinitrc openbox >~/.xsession-errors 2>&1
+fi
+
+# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #