OS: Separate Windows 10 into its own if clause
This commit is contained in:
parent
7d231b88fa
commit
3b34a78c4c
1 changed files with 10 additions and 9 deletions
19
neofetch
19
neofetch
|
@ -58,15 +58,7 @@ get_distro() {
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "BSD" | "MINIX")
|
"Linux" | "BSD" | "MINIX")
|
||||||
if [[ "$(< /proc/version)" == *"Microsoft"* ||
|
if [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
|
||||||
"$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
|
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
|
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
|
||||||
"tiny") distro="Chrome OS" ;;
|
"tiny") distro="Chrome OS" ;;
|
||||||
|
@ -163,6 +155,15 @@ get_distro() {
|
||||||
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
||||||
fi
|
fi
|
||||||
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="$(trim_quotes "$distro")"
|
||||||
distro="${distro/'NAME='}"
|
distro="${distro/'NAME='}"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue