diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index c2d4094..18e210e 100755 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -7,8 +7,9 @@ export PATH export SXHKD_SHELL='/bin/sh' -[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx $HOME/.config/X11/xinitrc &> /dev/null -# [[ $(fgconsole 2>/dev/null) == 1 ]] && exec start-dwl &> /dev/null -# [[ $(fgconsole 2>/dev/null) == 1 ]] && exec start-hyprland &> /dev/null - eval "$(ssh-agent -s)" &> /dev/null + +if [[ -z $DISPLAY ]] && (( $EUID != 0 )) { + [[ ${TTY/tty} != $TTY ]] && (( ${TTY:8:1} == 1 )) && + exec startx $HOME/.config/X11/xinitrc 1> ~/.local/share/logs/xsession-errors 2>&1 +}