dotfiles/home/.config/shell/profile

20 lines
587 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
2021-07-19 23:59:39 +00:00
# User .profile definition.
# This file is only sourced once, after login, Unlike
# .zshrc/.bashrc, which will run whenever a new terminal
# is opened.
2021-07-19 23:59:39 +00:00
2021-07-21 22:16:41 +00:00
# Add all folders in ~/.local/bin into PATH
# Some window managers require this line to be in profile
# not in .zshenv
PATH+=":${$(find ~/.local/bin -type d | tr '\n' ':')%%:}"
2021-07-19 23:59:39 +00:00
# Start graphical session automatically on tty1 if startx is aviable
if [ "$(tty)" = "/dev/tty1" ] && [ "$UID" != 0 ]; then
2021-07-17 20:58:26 +00:00
if command -v startx > /dev/null; then
! pidof -s Xorg > /dev/null 2>&1 && exec startx "$XINITRC"
fi
2021-07-14 17:12:51 +00:00
fi