shell: move X before wayland, use output of tty instead of XDG_VTNR

This commit is contained in:
2025-10-11 16:51:52 +02:00
parent 5018c78956
commit a09a464f0c

View File

@@ -32,14 +32,14 @@ done
export PATH
# start X or Hyprland at login
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$XDG_VTNR" -eq 1 ]; then
if which Hyprland > /dev/null && [ -d ~/.config/hypr ]; then
exec Hyprland
elif which river > /dev/null && [ -d ~/.config/river ]; then
exec river
elif which /usr/bin/sx > /dev/null; then
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if which /usr/bin/sx > /dev/null; then
exec /usr/bin/sx ~/.xsession
elif which /usr/bin/startx > /dev/null; then
exec /usr/bin/startx
elif which Hyprland > /dev/null && [ -d ~/.config/hypr ]; then
exec Hyprland
elif which river > /dev/null && [ -d ~/.config/river ]; then
exec river
fi
fi