Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit aab631c

Browse files
committed
neofetch: Fix WSL windows version. Closes #1848
1 parent c4fba8b commit aab631c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

neofetch

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,10 +1102,13 @@ get_distro() {
11021102
fi
11031103

11041104
if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then
1105+
windows_version=$(wmic os get Version)
1106+
windows_version=$(trim "${windows_version/Version}")
1107+
11051108
case $distro_shorthand in
1106-
on) distro+=" [Windows 10]" ;;
1107-
tiny) distro="Windows 10" ;;
1108-
*) distro+=" on Windows 10" ;;
1109+
on) distro+=" [Windows $windows_version]" ;;
1110+
tiny) distro="Windows ${windows_version::2}" ;;
1111+
*) distro+=" on Windows $windows_version" ;;
11091112
esac
11101113

11111114
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then

0 commit comments

Comments
 (0)