summaryrefslogtreecommitdiff
path: root/config/essentials/zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'config/essentials/zsh/.zshrc')
-rw-r--r--config/essentials/zsh/.zshrc15
1 files changed, 7 insertions, 8 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index 414a7d7..e46cf8e 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -1,15 +1,14 @@
#!/bin/zsh
-if [[ "/dev/tty1" = "$TTY" || "/dev/tty2" = "$TTY" ]] && [[ "$(id -u)" -ne 0 ]]
+if [ "$(id -u)" -ne 0 ]
then
clear
- if [ "/dev/tty1" = "$TTY" ]
- then
- exec startw > /dev/null 2>&1
- else
- exec startx > /dev/null 2>&1
- fi
- exit
+ case "${TTY#/dev/tty}" in
+ 1) exec startw > /dev/null 2>&1 ;;
+ 2) exec startx > /dev/null 2>&1 ;;
+ 3) exec startdwl > /dev/null 2>&1 ;;
+ *) false ;;
+ esac && exit
fi
autoload -U select-word-style