From f6279b1b2ef7a2018a11f50b5c1c82010b0726b7 Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 1 Jan 2026 13:17:01 -0500 Subject: [PATCH] greeter: simplify start-hyprland check --- quickshell/Modules/Greetd/assets/dms-greeter | 12 +++++------- quickshell/Modules/Greetd/assets/greet-hyprland.sh | 6 +----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/quickshell/Modules/Greetd/assets/dms-greeter b/quickshell/Modules/Greetd/assets/dms-greeter index be224d93..678bc720 100755 --- a/quickshell/Modules/Greetd/assets/dms-greeter +++ b/quickshell/Modules/Greetd/assets/dms-greeter @@ -186,13 +186,11 @@ exec = sh -c "$QS_CMD; hyprctl dispatch exit" HYPRLAND_EOF COMPOSITOR_CONFIG="$TEMP_CONFIG" fi - CURRENT_VERSION=$(hyprland --version | grep "Tag:" | awk '{print $2}' | tr -d 'v,') - MINIMUM_VERSION="0.53.0" - if [ "$(printf '%s\n%s' "$MINIMUM_VERSION" "$CURRENT_VERSION" | sort -V | head -n1)" = "$MINIMUM_VERSION" ]; then - exec start-hyprland -- --config "$COMPOSITOR_CONFIG" - else - exec Hyprland -c "$COMPOSITOR_CONFIG" - fi + if command -v start-hyprland >/dev/null 2>&1; then + exec start-hyprland -- --config "$COMPOSITOR_CONFIG" + else + exec Hyprland -c "$COMPOSITOR_CONFIG" + fi ;; sway) diff --git a/quickshell/Modules/Greetd/assets/greet-hyprland.sh b/quickshell/Modules/Greetd/assets/greet-hyprland.sh index 91e46c24..c23b4790 100755 --- a/quickshell/Modules/Greetd/assets/greet-hyprland.sh +++ b/quickshell/Modules/Greetd/assets/greet-hyprland.sh @@ -4,11 +4,7 @@ export XDG_SESSION_TYPE=wayland export QT_QPA_PLATFORM=wayland export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export EGL_PLATFORM=gbm -CURRENT_VERSION=$(hyprland --version | grep "Tag:" | awk '{print $2}' | tr -d 'v,') - -MINIMUM_VERSION="0.53.0" - -if [ "$(printf '%s\n%s' "$MINIMUM_VERSION" "$CURRENT_VERSION" | sort -V | head -n1)" = "$MINIMUM_VERSION" ]; then +if command -v start-hyprland >/dev/null 2>&1; then exec start-hyprland -- -c /etc/greetd/dms-hypr.conf else exec Hyprland -c /etc/greetd/dms-hypr.conf