diff options
Diffstat (limited to 'config/essentials')
-rw-r--r-- | config/essentials/zsh/.zshrc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 0efee9b..7fa61c7 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -1,14 +1,15 @@ #!/bin/zsh -if [ "$(id -u)" -ne 0 ] +if [[ "/dev/tty1" = "$TTY" || "/dev/tty2" = "$TTY" ]] && [[ "$(id -u)" -ne 0 ]] then - [ "${TTY%%tty*}" = '/dev/' ] && clear - case "${TTY#/dev/tty}" in - 1) exec startdwl > /dev/null 2>&1 ;; - 2) exec startx > /dev/null 2>&1 ;; - 3) exec startw > /dev/null 2>&1 ;; - *) false ;; - esac && exit + clear + if [ "/dev/tty1" = "$TTY" ] + then + exec startw > /dev/null 2>&1 + else + exec startx > /dev/null 2>&1 + fi + exit fi autoload -U select-word-style @@ -27,11 +28,12 @@ compinit . $ZDOTDIR/functions.zsh . $ZDOTDIR/aliases.sh -for file in /etc/os-release /usr/lib/os-release +for file in /{etc,usr/lib}/os-release do [ -f "$file" ] && . "$file" && break done case "${ID:=unknown}" in debian|ubuntu) PLUGPATH=/usr/share/ ;; + unknown) PLUGPATH=$HOME/.config/zsh/plugins ;; *) PLUGPATH=/usr/share/zsh/plugins ;; esac . $PLUGPATH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |