dotfiles/home/.config/shell/profile

16 lines
410 B
Bash
Executable file

#!/bin/sh
# User .profile definition.
# This file is only sourced once, after login, Unlike
# .zshrc/.bashrc, which will run whenever a new terminal
# is opened.
# Start graphical session automatically on tty1 if startx is aviable
if [ "$(tty)" = "/dev/tty1" ] && [ "$UID" != 0 ]; then
if command -v startx > /dev/null; then
! pidof -s Xorg > /dev/null 2>&1 && exec startx "$XINITRC"
fi
fi