summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zprofile10
1 files changed, 10 insertions, 0 deletions
diff --git a/.zprofile b/.zprofile
index 846316d..18dd08a 100644
--- a/.zprofile
+++ b/.zprofile
@@ -1,3 +1,13 @@
+if type startx &>/dev/null && ! pgrep X >/dev/null; then
+ [[ -z $TTY ]] && TTY=$(tty)
+ TTY=${TTY#/dev/}
+
+ if [[ $TTY = tty1 ]]; then
+ startx | systemd-cat -t Xorg-session
+ exit
+ fi
+fi
+
if tty -s && [[ -z $DISPLAY ]]; then
if type tmux &>/dev/null; then
if [[ -z "$TMUX" ]]; then