neofetch: Fix WSL windows version. Closes #1848
This commit is contained in:
parent
c4fba8bb0b
commit
aab631c7dd
1 changed files with 6 additions and 3 deletions
9
neofetch
9
neofetch
|
@ -1102,10 +1102,13 @@ get_distro() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then
|
if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then
|
||||||
|
windows_version=$(wmic os get Version)
|
||||||
|
windows_version=$(trim "${windows_version/Version}")
|
||||||
|
|
||||||
case $distro_shorthand in
|
case $distro_shorthand in
|
||||||
on) distro+=" [Windows 10]" ;;
|
on) distro+=" [Windows $windows_version]" ;;
|
||||||
tiny) distro="Windows 10" ;;
|
tiny) distro="Windows ${windows_version::2}" ;;
|
||||||
*) distro+=" on Windows 10" ;;
|
*) distro+=" on Windows $windows_version" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
|
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
|
||||||
|
|
Loading…
Reference in a new issue