From f0f6336b4e92bb5add9fb04e68fe03ba356a1161 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 10 Apr 2023 15:49:49 +0200 Subject: [PATCH] Add fallback to xinit if hyprland isn't installed --- home/.config/shell/profile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/home/.config/shell/profile b/home/.config/shell/profile index b48552c..404d802 100755 --- a/home/.config/shell/profile +++ b/home/.config/shell/profile @@ -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 -