From 3b34a78c4cb1505e30491b4d262e9b9327cec676 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Mar 2018 07:10:37 +0700 Subject: [PATCH] OS: Separate Windows 10 into its own if clause --- neofetch | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index 11392b19..a74ee28d 100755 --- a/neofetch +++ b/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='}" ;;