diff options
author | Starfall <us@starfall.systems> | 2022-11-19 23:13:17 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-11-19 23:13:17 -0600 |
commit | 34fcfc8ca9385b3d77d8a56b06b66b27bebd2840 (patch) | |
tree | efb82e4fcb056168a94b494dd55aa308d47bcc0f | |
parent | 5ba33363e68ac7eba8244fde662511e76eb0aeeb (diff) |
zsh: only startx if x is available
-rw-r--r-- | .config/zsh/.zshrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 4234df4..23adb40 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -37,6 +37,6 @@ unset conf tty -s && fortune $HOME/fortunes 2>/dev/null ||: # startx if not already running an x server (e.g. via display manager) and only on tty1 -if [ -z "${DISPLAY}" ] && [ "$(tty)" = "/dev/tty1" ]; then +if (command -v startx) && [ -z "${DISPLAY}" ] && [ "$(tty)" = "/dev/tty1" ]; then exec startx fi |