zsh: improve condition for startx

master
Guillaume Dott 2021-03-12 11:48:44 +01:00
parent 553a0e6720
commit 91e2532b3e
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
emulate sh -c 'source /etc/profile'
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && "$(tty)" = "/dev/tty1" ]]; then
exec startx
fi