From aab631c7dd701ae35a70632a9672c8e9b18fe656 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 6 Dec 2021 05:31:15 +0200 Subject: [PATCH] neofetch: Fix WSL windows version. Closes #1848 --- neofetch | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 9fef38fe..85ccb8db 100755 --- a/neofetch +++ b/neofetch @@ -1102,10 +1102,13 @@ get_distro() { fi if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then + windows_version=$(wmic os get Version) + windows_version=$(trim "${windows_version/Version}") + case $distro_shorthand in - on) distro+=" [Windows 10]" ;; - tiny) distro="Windows 10" ;; - *) distro+=" on Windows 10" ;; + on) distro+=" [Windows $windows_version]" ;; + tiny) distro="Windows ${windows_version::2}" ;; + *) distro+=" on Windows $windows_version" ;; esac elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then