summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-05-18 11:53:52 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-05-18 11:56:03 +0200
commit28480f1134476baef7933c1c452bdd8fe60bca15 (patch)
treeaaadadfe367ee885f3b470c1578d4472b8f52066
parent1651bab9177c4dfaba7aa9f06347797a84ed60a7 (diff)
downloaddotfiles-28480f1134476baef7933c1c452bdd8fe60bca15.tar.gz
dotfiles-28480f1134476baef7933c1c452bdd8fe60bca15.tar.xz
zprofile: Add Xorg support
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-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