From 08fe7f54c0daf00f49993eb74f56e1ce4d0be781 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 17 Oct 2023 00:04:16 +0200 Subject: refactor --- config/essentials/zsh/.zshrc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'config/essentials/zsh/.zshrc') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 414a7d7..993ae8a 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/}" in + tty1) exec startw ;; + tty2) exec startx ;; + tty3) exec startdwl ;; + *) false ;; + esac && exit fi autoload -U select-word-style -- cgit v1.2.3