From 3dff1947b5b1763210433321bb2bd6cf8091d0f4 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 18 Sep 2016 16:58:01 +0700 Subject: [PATCH] Initial support for Windows 10 Linux subsystem --- neofetch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 9a743aaf..d912e185 100755 --- a/neofetch +++ b/neofetch @@ -118,7 +118,16 @@ getdistro() { case "$os" in "Linux" ) - if type -p lsb_release >/dev/null 2>&1; then + if grep -q 'Microsoft' /proc/version >/dev/null 2>&1 || \ + grep -q 'Microsoft' /proc/sys/kernel/osrelease >/dev/null 2>&1; then + case "$distro_shorthand" in + "on") distro="$(lsb_release -sir 2>/dev/null) [Windows 10]" ;; + "tiny") distro="Windows 10" ;; + *) distro="$(lsb_release -sd 2>/dev/null) on Windows 10" ;; + esac + ascii_distro="windows10" + + elif type -p lsb_release >/dev/null 2>&1; then case "$distro_shorthand" in "on") distro="$(lsb_release -sir 2>/dev/null)" ;; "tiny") distro="$(lsb_release -si 2>/dev/null)" ;;