aboutsummaryrefslogtreecommitdiffstats
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
parent9b472f58253cf3ff9f4df8308d3aa552aaa51227 (diff)
downloaddotfiles-b8100b88c4fa4edacd6bf3e34074ab8678a44f1c.tar.bz2
Tune zsh configs; Auto startx if login on tty6 (.zlogin)
-rw-r--r--_zlogin22
-rw-r--r--_zprofile2
-rw-r--r--_zsh/history.zsh8
-rw-r--r--_zsh/setopt.zsh2
-rw-r--r--_zshrc4
5 files changed, 33 insertions, 5 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: #
diff --git a/_zprofile b/_zprofile
index 4c531d8..bd91588 100644
--- a/_zprofile
+++ b/_zprofile
@@ -11,6 +11,6 @@
# Updated: 2016-01-26
#
-[ -f ~/.profile ] && emulate sh -c '. ~/.profile'
+[ -e ~/.profile ] && emulate sh -c '. ~/.profile'
# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
diff --git a/_zsh/history.zsh b/_zsh/history.zsh
index b668ed4..bfa6317 100644
--- a/_zsh/history.zsh
+++ b/_zsh/history.zsh
@@ -2,9 +2,11 @@
# zsh/history.zsh
#
-# history settings
-HISTSIZE=1000
-SAVEHIST=800
HISTFILE=~/.zsh_history
+HISTSIZE=2000
+SAVEHIST=1800
+# ignore these commands without arguments
+HISTIGNORE="cd:ls:ll"
+
# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
diff --git a/_zsh/setopt.zsh b/_zsh/setopt.zsh
index f80fda6..79a1832 100644
--- a/_zsh/setopt.zsh
+++ b/_zsh/setopt.zsh
@@ -44,7 +44,7 @@ unsetopt MENU_COMPLETE
# spelling correction for commands
setopt CORRECT
# spelling correction for arguments
-setopt CORRECTALL
+#setopt CORRECTALL
## Prompt
# enable parameter expansion, command substitution, and arithmetic expansion
diff --git a/_zshrc b/_zshrc
index d2dd537..1a54197 100644
--- a/_zshrc
+++ b/_zshrc
@@ -11,6 +11,10 @@
## [2] Zsh Configuration from the Ground Up
## http://zanshin.net/2013/02/02/zsh-configuration-from-the-ground-up/
##
+## References:
+## [1] The Unix Shell's Humble if
+## https://robots.thoughtbot.com/the-unix-shells-humble-if
+##
## Aaron LI
## Created: 2014-05-31
## Updated: 2016-01-30