From 80b656bfccc464427fce209b58a67319e8931c06 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 18 Nov 2024 14:57:12 +0100 Subject: checkpoint --- config/essentials/zsh/.zprofile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zprofile b/config/essentials/zsh/.zprofile index 17d773a..9ae68bc 100755 --- a/config/essentials/zsh/.zprofile +++ b/config/essentials/zsh/.zprofile @@ -1,12 +1,8 @@ #!/bin/sh -if [ "$(id -u)" -ne 0 ] -then - # if a login tty clear the screen - [ "${TTY%%tty*}" = '/dev/' ] && clear - # check if login tty is 2 - case "${TTY#/dev/tty}" in - 2) exec startx > /dev/null 2>&1 ;; - *) false ;; - esac && exit +[ "${TTY%%tty*}" = '/dev/' ] && clear + +if [ "$FROMLY" ] && [ "$(id -u)" -ne 0 ]; then + exec startx > /dev/null 2>&1 + exit fi -- cgit v1.2.3