From a09a464f0c8b908b8aa826276932b4536e75aa29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 11 Oct 2025 16:51:52 +0200 Subject: [PATCH] shell: move X before wayland, use output of tty instead of XDG_VTNR --- shell/.profile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shell/.profile b/shell/.profile index a225055..214519b 100644 --- a/shell/.profile +++ b/shell/.profile @@ -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