Merge branch 'master' of github.com:hykilpikonna/hyfetch
This commit is contained in:
commit
a6a17d102c
2 changed files with 22 additions and 7 deletions
|
@ -32,6 +32,7 @@ Currently, these distributions have existing packages for HyFetch:
|
|||
* Nix: `nix-env -i hyfetch` (Thanks to [@YisuiDenghua](https://github.com/YisuiDenghua))
|
||||
* Guix: `guix install hyfetch` (Thanks to [@WammKD](https://github.com/WammKD))
|
||||
* Slackware `sbopkg -b hyfetch` Slackware [Slackbuild](https://slackbuilds.org/repository/15.0/desktop/hyfetch/?search=hyfetch) (Thanks to [@bittin](https://github.com/bittin) and Urchlay)
|
||||
* Nix Profile `nix profile install nixpkgs#hyfetch`
|
||||
|
||||
|
||||
### Method 3: Install the latest developmental version using git
|
||||
|
|
28
neofetch
28
neofetch
|
@ -1271,10 +1271,16 @@ get_distro() {
|
|||
# - The `any` version (ie `on Windows 11 Pro Insider Preview`)
|
||||
if [[ $(< /proc/version) == *Microsoft* || $kernel_version == *Microsoft* ]]; then
|
||||
|
||||
windows_version_verbose=$(wmic.exe os get Caption)
|
||||
windows_version_verbose=$(trim "${windows_version_verbose/Caption}")
|
||||
windows_version_verbose=$(trim "${windows_version_verbose/Microsoft}")
|
||||
windows_version_verbose=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v ProductName | grep REG_)
|
||||
windows_version_verbose=$(trim "${windows_version_verbose/ProductName}")
|
||||
windows_version_verbose=$(trim "${windows_version_verbose/REG_SZ}")buildnumber=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v CurrentBuildNumber | grep REG_)
|
||||
windows_version_verbose=$(trim "${windows_version_verbose/Windows}")
|
||||
windows_buildnumber=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v CurrentBuildNumber | grep REG_)
|
||||
windows_buildnumber=${buildnumber/CurrentBuildNumber}
|
||||
windows_buildnumber=${buildnumber/REG_SZ}
|
||||
if [[ "$windows_version_verbose" == *"10"* ]] && (( windows_buildnumber >= 22000 )); then
|
||||
windows_version_verbose=${windows_version_verbose/10/11}
|
||||
fi
|
||||
|
||||
windows_version_current=${windows_version_verbose//[^[:digit:]]/}
|
||||
|
||||
|
@ -1383,9 +1389,17 @@ get_distro() {
|
|||
;;
|
||||
|
||||
Windows)
|
||||
distro=$(wmic os get Caption)
|
||||
distro=${distro/Caption}
|
||||
distro=${distro/Microsoft }
|
||||
distro=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v ProductName | grep REG_)
|
||||
distro=${distro/ProductName}
|
||||
distro=${distro/REG_SZ}
|
||||
buildnumber=$(reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -v CurrentBuildNumber | grep REG_)
|
||||
buildnumber=${buildnumber/CurrentBuildNumber}
|
||||
buildnumber=${buildnumber/REG_SZ}
|
||||
|
||||
# If the value of "ProductName" obtained is Windows 10 and the value of "CurrentBuildNumber" is greater than 22000, then the actual operating system version is Windows 11.
|
||||
if [[ "$distro" == *"Windows 10"* ]] && (( buildnumber >= 22000 )); then
|
||||
distro=${distro/Windows 10/Windows 11}
|
||||
fi
|
||||
;;
|
||||
|
||||
Solaris|illumos)
|
||||
|
@ -2091,7 +2105,7 @@ get_packages() {
|
|||
has choco && dir "$ProgramData"/chocolatey/lib/*
|
||||
|
||||
# Count winget
|
||||
has winget && tot winget list
|
||||
has winget && tot winget list --accept-source-agreements
|
||||
;;
|
||||
|
||||
Haiku)
|
||||
|
|
Loading…
Reference in a new issue