Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Update List of MacOS, iOS Hardware and OS Types
Browse files Browse the repository at this point in the history
  • Loading branch information
LanikSJ committed Jun 7, 2023
1 parent e60d34f commit 7433316
Showing 1 changed file with 77 additions and 28 deletions.
105 changes: 77 additions & 28 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

version=7.2.3
version=7.2.4

# Fallback to a value of '5' for shells which support bash
# but do not set the 'BASH_' shell variables (osh).
Expand Down Expand Up @@ -1152,10 +1152,11 @@ get_distro() {
10.13*) codename="macOS High Sierra" ;;
10.14*) codename="macOS Mojave" ;;
10.15*) codename="macOS Catalina" ;;
11.*) codename="macOS Big Sur" ;;
12.*) codename="macOS Monterey" ;;
13.*) codename="macOS Ventura" ;;
*) codename=macOS ;;
11.*) codename="macOS Big Sur" ;;
12.*) codename="macOS Monterey" ;;
13.*) codename="macOS Ventura" ;;
14.*) codename="macOS Sonoma" ;;
*) codename="macOS" ;;
esac

distro="$codename $osx_version $osx_build"
Expand All @@ -1165,9 +1166,9 @@ get_distro() {

tiny)
case $osx_version in
10.[4-7]*) distro=${distro/${codename}/Mac OS X} ;;
10.[8-9]*|10.1[0-1]*) distro=${distro/${codename}/OS X} ;;
10.1[2-6]*|11.*|12.*|13.*) distro=${distro/${codename}/macOS} ;;
10.[4-7]*) distro=${distro/${codename}/Mac OS X} ;;
10.[8-9]*|10.1[0-1]*) distro=${distro/${codename}/OS X} ;;
10.1[2-6]*|11.*|12.*|13.*|14.*) distro=${distro/${codename}/macOS} ;;
esac
distro=${distro/ ${osx_build}}
;;
Expand Down Expand Up @@ -1262,7 +1263,8 @@ get_model() {
else
mac_model=$(sysctl -n hw.model)
case $mac_model in
Mac14,10): "MacBook Pro (16-inch, 2023)" ;;
Mac14,10): "MacBook Pro (16-inch, M2, 2023)" ;;
Mac14,7): "MacBook Pro (13-inch, M2, 2022)" ;;
MacBookPro18,[3-4]): "MacBook Pro (14-inch, 2021)" ;;
MacBookPro18,[1-2]): "MacBook Pro (16-inch, 2021)" ;;
MacBookPro17,1): "MacBook Pro (13-inch, M1, 2020)" ;;
Expand Down Expand Up @@ -1299,6 +1301,7 @@ get_model() {
MacBookPro5,2): "MacBook Pro (17-inch, Mid/Early 2009)" ;;
MacBookPro5,1): "MacBook Pro (15-inch, Late 2008)" ;;
MacBookPro4,1): "MacBook Pro (17/15-inch, Early 2008)" ;;
Mac14,2): "MacBook Air (M2, 2022)" ;;
MacBookAir10,1): "MacBook Air (M1, 2020)" ;;
MacBookAir9,1): "MacBook Air (Retina, 13-inch, 2020)" ;;
MacBookAir8,2): "MacBook Air (Retina, 13-inch, 2019)" ;;
Expand All @@ -1320,6 +1323,41 @@ get_model() {
MacBook7,1): "MacBook (13-inch, Mid 2010)" ;;
MacBook6,1): "MacBook (13-inch, Late 2009)" ;;
MacBook5,2): "MacBook (13-inch, Early/Mid 2009)" ;;
Mac13,1): "Mac Studio (2022, Two USB-C front ports)" ;;
Mac13,2): "Mac Studio (2022, Two Thunderbolt 4 front ports)" ;;
Macmini9,1): "Mac mini (M1, 2020)" ;;
Macmini8,1): "Mac mini (2018)" ;;
Macmini7,1): "Mac mini (Mid 2014)" ;;
Macmini6,[1-2]): "Mac mini (Late 2012)" ;;
Macmini5,[1-2]): "Mac mini (Mid 2011)" ;;
Macmini4,1): "Mac mini (Mid 2010)" ;;
Macmini3,1): "Mac mini (Early/Late 2009)" ;;
MacPro7,1): "Mac Pro (2019)" ;;
MacPro6,1): "Mac Pro (Late 2013)" ;;
MacPro5,1): "Mac Pro (Mid 2010 - Mid 2012)" ;;
MacPro4,1): "Mac Pro (Early 2009)" ;;
iMac21,[1-2]): "iMac (24-inch, M1, 2021)" ;;
iMac20,[1-2]): "iMac (Retina 5K, 27-inch, 2020)" ;;
iMac19,[1-2]): "iMac (Retina 4K, 21.5-inch, 2019)" ;;
iMacPro1,1): "iMac Pro (2017)" ;;
iMac18,3): "iMac (Retina 5K, 27-inch, 2017)" ;;
iMac18,2): "iMac (Retina 4K, 21.5-inch, 2017)" ;;
iMac18,1): "iMac (21.5-inch, 2017)" ;;
iMac17,1): "iMac (Retina 5K, 27-inch, Late 2015)" ;;
iMac16,2): "iMac (Retina 4K, 21.5-inch, Late 2015)" ;;
iMac16,1): "iMac (21.5-inch, Late 2015)" ;;
iMac15,1): "iMac (Retina 5K, 27-inch, Late 2014 - Mid 2015)" ;;
iMac14,4): "iMac (21.5-inch, Mid 2014)" ;;
iMac14,2): "iMac (27-inch, Late 2013)" ;;
iMac14,1): "iMac (21.5-inch, Late 2013)" ;;
iMac13,2): "iMac (27-inch, Late 2012)" ;;
iMac13,1): "iMac (21.5-inch, Late 2012)" ;;
iMac12,2): "iMac (27-inch, Mid 2011)" ;;
iMac12,1): "iMac (21.5-inch, Mid 2011)" ;;
iMac11,3): "iMac (27-inch, Mid 2010)" ;;
iMac11,2): "iMac (21.5-inch, Mid 2010)" ;;
iMac10,1): "iMac (27/21.5-inch, Late 2009)" ;;
iMac9,1): "iMac (24/20-inch, Early 2009)" ;;
*): "$mac_model" ;;
esac

Expand All @@ -1330,6 +1368,7 @@ get_model() {
"iPhone OS")
case $kernel_machine in
iPad1,1): "iPad" ;;
iPad1,2): "iPad 3G" ;;
iPad2,[1-4]): "iPad 2" ;;
iPad3,[1-3]): "iPad 3" ;;
iPad3,[4-6]): "iPad 4" ;;
Expand All @@ -1338,20 +1377,25 @@ get_model() {
iPad7,1[1-2]): "iPad 7" ;;
iPad11,[6-7]): "iPad 8" ;;
iPad12,[1-2]): "iPad 9" ;;
iPad13,1[8-9]): "iPad 10" ;;
iPad4,[1-3]): "iPad Air" ;;
iPad5,[3-4]): "iPad Air 2" ;;
iPad11,[3-4]): "iPad Air 3" ;;
iPad13,[1-2]): "iPad Air 4";;
iPad6,[7-8]): "iPad Pro (12.9 Inch)" ;;
iPad6,[3-4]): "iPad Pro (9.7 Inch)" ;;
iPad7,[1-2]): "iPad Pro 2 (12.9 Inch)" ;;
iPad7,[3-4]): "iPad Pro (10.5 Inch)" ;;
iPad8,[1-4]): "iPad Pro (11 Inch)" ;;
iPad8,[5-8]): "iPad Pro 3 (12.9 Inch)" ;;
iPad8,9 | iPad8,10): "iPad Pro 4 (11 Inch)" ;;
iPad8,1[1-2]): "iPad Pro 4 (12.9 Inch)" ;;
iPad13,[4-7]): "iPad Pro 5 (11 Inch)" ;;
iPad13,8 | iPad13,11): "iPad Pro 5 (12.9 Inch)" ;;
iPad13,[1-2]): "iPad Air 4" ;;
iPad13,1[6-7]): "iPad Air 5" ;;
iPad6,[7-8]): "iPad Pro 12.9-inch" ;;
iPad6,[3-4]): "iPad Pro 9.7-inch" ;;
iPad7,[1-2]): "iPad Pro 12.9-inch (2nd generation)" ;;
iPad7,[3-4]): "iPad Pro 10.5-inch" ;;
iPad8,[1-4]): "iPad Pro 11-inch" ;;
iPad8,[5-8]): "iPad Pro 12.9-inch (3rd generation)" ;;
iPad8,9 | iPad8,10): "iPad Pro 11-inch (2nd generation)" ;;
iPad8,1[1-2]): "iPad Pro 12.9-inch (4th generation)" ;;
iPad13,[4-7]): "iPad Pro 11-inch (3rd generation)" ;;
iPad13,[8-9]): "iPad Pro 12.9-inch (5th generation)" ;;
iPad13,1[0-1]): "iPad Pro 12.9-inch (5th generation)" ;;
iPad14,[3-4]): "iPad Pro 11-inch (4th generation)" ;;
iPad14,[5-6]): "iPad Pro 12.9-inch (6th generation)" ;;
iPad2,[5-7]): "iPad mini" ;;
iPad4,[4-6]): "iPad mini 2" ;;
iPad4,[7-9]): "iPad mini 3" ;;
Expand Down Expand Up @@ -1392,14 +1436,19 @@ get_model() {
iPhone14,3): "iPhone 13 Pro Max" ;;
iPhone14,4): "iPhone 13 Mini" ;;
iPhone14,5): "iPhone 13" ;;

iPod1,1): "iPod Touch" ;;
ipod2,1): "iPod Touch 2G" ;;
ipod3,1): "iPod Touch 3G" ;;
ipod4,1): "iPod Touch 4G" ;;
ipod5,1): "iPod Touch 5G" ;;
ipod7,1): "iPod Touch 6G" ;;
iPod9,1): "iPod Touch 7G" ;;
iPhone14,6): "iPhone SE 2022" ;;
iPhone14,7): "iPhone 14" ;;
iPhone14,8): "iPhone 14 Plus" ;;
iPhone15,2): "iPhone 14 Pro" ;;
iPhone15,3): "iPhone 14 Pro Max" ;;

iPod1,1): "iPod touch" ;;
iPod2,1): "iPod touch 2G" ;;
iPod3,1): "iPod touch 3G" ;;
iPod4,1): "iPod touch 4G" ;;
iPod5,1): "iPod touch 5G" ;;
iPod7,1): "iPod touch 6G" ;;
iPod9,1): "iPod touch 7G" ;;
esac

model=$_
Expand Down

0 comments on commit 7433316

Please sign in to comment.