From 6181681134390bad8fad85142216f4e1707b8f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 24 Feb 2024 14:23:45 +0100 Subject: [PATCH] Hyprland: try Hyperland before sx --- shell/.profile | 10 ++++++++-- shell/.zprofile | 7 +------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/shell/.profile b/shell/.profile index e7e9f09..abeb571 100644 --- a/shell/.profile +++ b/shell/.profile @@ -27,5 +27,11 @@ done export PATH -# start X at login -[[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null && exec sx ~/.xsession +# start X or Hyprland at login +if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then + if which /usr/bin/Hyprland > /dev/null; then + exec /usr/bin/Hyprland + elif which /usr/bin/sx > /dev/null; then + exec /usr/bin/sx ~/.xsession + fi +fi diff --git a/shell/.zprofile b/shell/.zprofile index b9f5bf3..b2faa22 100644 --- a/shell/.zprofile +++ b/shell/.zprofile @@ -1,6 +1 @@ -# start X at login on first console or otherwise source ~/.profile -if [[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null; then - exec sx ~/.xsession -else - source ~/.profile -fi +source ~/.profile