feat(session-select): make desktop environment detection case-insensitive
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@ -75,24 +75,26 @@ if [[ -f /usr/share/xsessions/plasmax11.desktop ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
de_normalized="${DE,,}"
|
||||||
|
|
||||||
case "$session" in
|
case "$session" in
|
||||||
desktop)
|
desktop)
|
||||||
if [[ "$SESSION_TYPE" == "wayland" ]]; then
|
if [[ "$SESSION_TYPE" == "wayland" ]]; then
|
||||||
if [[ "$DE" == "GNOME" ]]; then
|
if [[ "$de_normalized" == *gnome* ]]; then
|
||||||
session_launcher="gnome-wayland"
|
session_launcher="gnome-wayland"
|
||||||
elif [[ "$DE" == "KDE" ]]; then
|
elif [[ "$de_normalized" == *kde* ]]; then
|
||||||
session_launcher="plasma"
|
session_launcher="plasma"
|
||||||
[[ "$KDE6" != "true" ]] && session_launcher="plasmawayland"
|
[[ "$KDE6" != "true" ]] && session_launcher="plasmawayland"
|
||||||
elif [[ "$DE" == "Hyprland" ]]; then
|
elif [[ "$de_normalized" == *hyprland* ]]; then
|
||||||
session_launcher="hyprland"
|
session_launcher="hyprland"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ "$DE" == "GNOME" ]]; then
|
if [[ "$de_normalized" == *gnome* ]]; then
|
||||||
session_launcher="gnome-xorg"
|
session_launcher="gnome-xorg"
|
||||||
elif [[ "$DE" == "KDE" ]]; then
|
elif [[ "$de_normalized" == *kde* ]]; then
|
||||||
session_launcher="plasmax11"
|
session_launcher="plasmax11"
|
||||||
[[ "$KDE6" != "true" ]] && session_launcher="plasma"
|
[[ "$KDE6" != "true" ]] && session_launcher="plasma"
|
||||||
elif [[ "$DE" == "MATE" ]]; then
|
elif [[ "$de_normalized" == *mate* ]]; then
|
||||||
session_launcher="mate"
|
session_launcher="mate"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user