diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-01-31 14:07:34 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-01-31 14:07:34 +0800 |
commit | b8100b88c4fa4edacd6bf3e34074ab8678a44f1c (patch) | |
tree | 0840d3e27a3f26c3ab51e3e1cc7c953865e418e8 | |
parent | 9b472f58253cf3ff9f4df8308d3aa552aaa51227 (diff) | |
download | dotfiles-b8100b88c4fa4edacd6bf3e34074ab8678a44f1c.tar.bz2 |
Tune zsh configs; Auto startx if login on tty6 (.zlogin)
-rw-r--r-- | _zlogin | 22 | ||||
-rw-r--r-- | _zprofile | 2 | ||||
-rw-r--r-- | _zsh/history.zsh | 8 | ||||
-rw-r--r-- | _zsh/setopt.zsh | 2 | ||||
-rw-r--r-- | _zshrc | 4 |
5 files changed, 33 insertions, 5 deletions
@@ -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: # @@ -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 @@ -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 |