From 28480f1134476baef7933c1c452bdd8fe60bca15 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 18 May 2016 11:53:52 +0200 Subject: zprofile: Add Xorg support Signed-off-by: Florian Pritz --- .zprofile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.zprofile') 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 -- cgit v1.2.3-24-g4f1b