feat(session-select): make desktop environment detection case-insensitive

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-06-10 08:47:05 +05:00
parent bc2f8293f2
commit 23c5feef3c

View File

@ -75,24 +75,26 @@ if [[ -f /usr/share/xsessions/plasmax11.desktop ]]; then
fi
fi
de_normalized="${DE,,}"
case "$session" in
desktop)
if [[ "$SESSION_TYPE" == "wayland" ]]; then
if [[ "$DE" == "GNOME" ]]; then
if [[ "$de_normalized" == *gnome* ]]; then
session_launcher="gnome-wayland"
elif [[ "$DE" == "KDE" ]]; then
elif [[ "$de_normalized" == *kde* ]]; then
session_launcher="plasma"
[[ "$KDE6" != "true" ]] && session_launcher="plasmawayland"
elif [[ "$DE" == "Hyprland" ]]; then
elif [[ "$de_normalized" == *hyprland* ]]; then
session_launcher="hyprland"
fi
else
if [[ "$DE" == "GNOME" ]]; then
if [[ "$de_normalized" == *gnome* ]]; then
session_launcher="gnome-xorg"
elif [[ "$DE" == "KDE" ]]; then
elif [[ "$de_normalized" == *kde* ]]; then
session_launcher="plasmax11"
[[ "$KDE6" != "true" ]] && session_launcher="plasma"
elif [[ "$DE" == "MATE" ]]; then
elif [[ "$de_normalized" == *mate* ]]; then
session_launcher="mate"
fi
fi