From c0fb89ce406f6bc3ba5ec997bfe94b0091b0df77 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 00:54:50 +0700 Subject: [PATCH 1/3] Distro: Refactor $machine_arch --- neofetch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index d9427bb5..95b59cbe 100755 --- a/neofetch +++ b/neofetch @@ -216,8 +216,14 @@ get_distro() { [[ -z "$distro" ]] && distro="$os (Unknown)" # Get OS architecture. - [[ "$os_arch" == "on" ]] && \ + if [[ "$os_arch" == "on" ]]; then + case "$os" in + "Solaris" | "AIX" | "BSD" | "macOS") machine_arch="$(uname -p)" ;; + *) machine_arch="$(uname -m)" ;; + + esac distro+=" ${machine_arch}" + fi [[ "${ascii_distro:-auto}" == "auto" ]] && \ ascii_distro="$(trim "$distro")" @@ -3772,11 +3778,10 @@ old_options() { cache_uname() { # Cache the output of uname so we don't # have to spawn it multiple times. - uname=($(uname -srm)) + uname=($(uname -sr)) kernel_name="${uname[0]}" kernel_version="${uname[1]}" - machine_arch="${uname[2]}" } convert_time() { From 2d1d689dd087d1193ebbb2acd05de39d19e67a25 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 12:44:30 +0700 Subject: [PATCH 2/3] Distro [uname]: Remove macOS, add Haiku to use -p --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 95b59cbe..17965dfd 100755 --- a/neofetch +++ b/neofetch @@ -218,7 +218,7 @@ get_distro() { # Get OS architecture. if [[ "$os_arch" == "on" ]]; then case "$os" in - "Solaris" | "AIX" | "BSD" | "macOS") machine_arch="$(uname -p)" ;; + "Solaris" | "AIX" | "BSD" | "Haiku") machine_arch="$(uname -p)" ;; *) machine_arch="$(uname -m)" ;; esac From 89fec98db809110f4312eda676722cbde39b106f Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 12:47:00 +0700 Subject: [PATCH 3/3] docs: changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c437a3bc..a2de9e40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,10 @@ ## Info +**Distro** + +- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID. + **Terminal Emulator** - Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**