OS: Separate Windows 10 into its own if clause
This commit is contained in:
parent
7d231b88fa
commit
3b34a78c4c
19
neofetch
19
neofetch
|
@ -58,15 +58,7 @@ get_distro() {
|
|||
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "MINIX")
|
||||
if [[ "$(< /proc/version)" == *"Microsoft"* ||
|
||||
"$kernel_version" == *"Microsoft"* ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro="$(lsb_release -sir) [Windows 10]" ;;
|
||||
"tiny") distro="Windows 10" ;;
|
||||
*) distro="$(lsb_release -sd) on Windows 10" ;;
|
||||
esac
|
||||
|
||||
elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
|
||||
if [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
|
||||
"tiny") distro="Chrome OS" ;;
|
||||
|
@ -163,6 +155,15 @@ get_distro() {
|
|||
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$(< /proc/version)" == *"Microsoft"* ||
|
||||
"$kernel_version" == *"Microsoft"* ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro+=" [Windows 10]" ;;
|
||||
"tiny") distro="Windows 10" ;;
|
||||
*) distro+=" on Windows 10" ;;
|
||||
esac
|
||||
fi
|
||||
distro="$(trim_quotes "$distro")"
|
||||
distro="${distro/'NAME='}"
|
||||
;;
|
||||
|
|
Reference in New Issue