From 32e32bc6e5f5455c3f5665978247994f3daa51f0 Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Tue, 13 Feb 2024 16:43:11 +0100 Subject: [PATCH] feat: if desktop cannot be auto detected, assume Hyprland --- hyprfreeze | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hyprfreeze b/hyprfreeze index 0344f45..7e6e8c4 100755 --- a/hyprfreeze +++ b/hyprfreeze @@ -122,12 +122,9 @@ function getPidByProp() { } function detectEnvironment() { - local Type local Desktop - eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type -p Desktop)" - [ -z "$Type" ] && echo "Could not determine session type via \`loginctl\`." && exit 1 - [ -z "$Desktop" ] && echo "Could not determine desktop environment via \`loginctl\`." && exit 1 - SESSION=$Type + eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Desktop)" + [ -z "$Desktop" ] && echo "Could not determine desktop environment via \`loginctl\`. Assuming Hyprland." && Desktop="hyprland" DESKTOP=$Desktop }