mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Add fallback to xinit if hyprland isn't installed
This commit is contained in:
parent
b430528874
commit
f0f6336b4e
|
@ -10,10 +10,15 @@
|
|||
# not in .zshenv
|
||||
PATH+=":${$(find ~/.local/bin -type d | tr '\n' ':')%%:}"
|
||||
|
||||
# Start graphical session automatically on tty1 if startx is aviable
|
||||
if [ -d "$HOME/.local/share/pyenv/shims" ]; then
|
||||
PATH+=":$HOME/.local/share/pyenv/shims"
|
||||
fi
|
||||
|
||||
# Start graphical session automatically on tty1 if Hyprland or startx is available
|
||||
if [ "$(tty)" = "/dev/tty1" ] && [ "$UID" != 0 ]; then
|
||||
if command -v Hyprland >/dev/null; then
|
||||
! pidof -s Hyprland >/dev/null 2>&1 && launch-hypr
|
||||
elif command -v startx >/dev/null; then
|
||||
! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue