mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-01-09 14:28:04 -05:00
Hopefully this fixes DESKTOP_SESSION issues presented in #711
This commit is contained in:
@@ -2078,7 +2078,17 @@ detectde () {
|
||||
|
||||
if [[ -z "$DE" || "$DE" = "Not Present" ]]; then
|
||||
# fallback to checking $DESKTOP_SESSION
|
||||
case "${DESKTOP_SESSION,,}" in
|
||||
local _DESKTOP_SESSION=
|
||||
if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
|
||||
if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
|
||||
_DESKTOP_SESSION=${DESKTOP_SESSION,,}
|
||||
else
|
||||
_DESKTOP_SESSION="$(tr '[:upper:]' '[:lower:]' <<< "${DESKTOP_SESSION}")"
|
||||
fi
|
||||
else
|
||||
_DESKTOP_SESSION="$(tr '[:upper:]' '[:lower:]' <<< "${DESKTOP_SESSION}")"
|
||||
fi
|
||||
case "${_DESKTOP_SESSION}" in
|
||||
'gnome'*)
|
||||
DE="GNOME"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user