diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2019-09-28 10:30:59 +0300 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2019-09-28 10:30:59 +0300 |
| commit | eb9c8a3cfe9d3c71d0e71a808f6f8123141aa7d9 (patch) | |
| tree | 2fd4ed6964d908a67a7ea15597c56deff0e7984b | |
| parent | 59340ff4cecafad33c44603e09b72483e0970e13 (diff) | |
| download | pfetch-eb9c8a3cfe9d3c71d0e71a808f6f8123141aa7d9.tar.gz | |
pfetch: WSL support
| -rwxr-xr-x | pfetch | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -171,6 +171,19 @@ get_os() { # don't follow any os-release/lsb standards whatsoever. command -v crux && distro=$(crux) command -v guix && distro='Guix System' + + # Check to see if Linux is running in Windows 10 under + # WSL (Windows subsystem for Linux) and append a string + # accordingly. + # + # If the kernel version string ends in "-Microsoft", + # we're very likely running under Windows 10 in WSL. + # + # This also acts as a means of allowing the user to + # fake this by changing their kernel version to end in + # "Microsoft". + [ "${kernel%%*-Microsoft}" ] || + distro="$distro on Windows 10" ;; Darwin*) |
