aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-09-23 17:12:07 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-09-23 17:13:47 +0100
commit10bed619fa5f5c566487413dd716d4f1cc60040f (patch)
treec8a0564eebc9c3b7ff69654da14c35427c951a8a
parent9db6e01de6f756afb3d31b0d23fcce98a565e851 (diff)
downloaddotfiles-10bed619fa5f5c566487413dd716d4f1cc60040f.tar.gz
dotfiles-10bed619fa5f5c566487413dd716d4f1cc60040f.tar.bz2
dotfiles-10bed619fa5f5c566487413dd716d4f1cc60040f.zip
(Shell/zprofile)+if TTY is /dev/tty1 then startx if not already open
-rw-r--r--Shell/.zprofile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Shell/.zprofile b/Shell/.zprofile
index 4304bdb..fe91285 100644
--- a/Shell/.zprofile
+++ b/Shell/.zprofile
@@ -23,10 +23,13 @@ export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
# Setup debuginfod
sh /etc/profile.d/debuginfod.sh
-# Import path to systemd
+# Import useful variables to systemd
systemctl --user import-environment PATH SSH_AUTH_SOCK
# Run some programs
echo "Welcome to..."
figlet "Arch Linux"
/usr/bin/pfetch
+
+# Start XServer if on TTY1 and it is not already active.
+[[ $TTY == "/dev/tty1" ]] && (pgrep -i "startx" || exec startx)