From bf3b1c1e2e83fa1794e70466f23da3980bcdbf67 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 20:22:39 +1000 Subject: [PATCH 01/32] Add iOS detection --- neofetch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index f7a46e41..ea7efc63 100755 --- a/neofetch +++ b/neofetch @@ -447,12 +447,13 @@ shopt -s nocasematch extglob # Operating System {{{ -case "$(uname)" in - "Linux") os="Linux" ;; - "Darwin") os="Mac OS X" ;; - "OpenBSD") os="OpenBSD" ;; - *"BSD") os="BSD" ;; - "CYGWIN"*) os="Windows" ;; +case "$(uname -sm)" in + "Linux"*) os="Linux" ;; + "Darwin"*) os="Mac OS X" ;; + "OpenBSD"*) os="OpenBSD" ;; + *"BSD"*) os="BSD" ;; + "CYGWIN"*) os="Windows" ;; + *"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;; *) printf "%s\n" "Unknown OS detected: $(uname)"; exit 1 ;; esac From 55a907b454cc07b10c3400b8d835941719210c75 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 20:27:31 +1000 Subject: [PATCH 02/32] Fix wildcarded BSD detection --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index ea7efc63..027672f2 100755 --- a/neofetch +++ b/neofetch @@ -451,9 +451,9 @@ case "$(uname -sm)" in "Linux"*) os="Linux" ;; "Darwin"*) os="Mac OS X" ;; "OpenBSD"*) os="OpenBSD" ;; - *"BSD"*) os="BSD" ;; + "FreeBSD"* | "NetBSD"*) os="BSD" ;; "CYGWIN"*) os="Windows" ;; - *"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;; + *"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;; *) printf "%s\n" "Unknown OS detected: $(uname)"; exit 1 ;; esac From ffab8e2f751010203f35308d4a6ae6fa07bb6e6e Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 20:33:00 +1000 Subject: [PATCH 03/32] Move iOS detection to the top of the block --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 027672f2..5560fb55 100755 --- a/neofetch +++ b/neofetch @@ -449,11 +449,11 @@ shopt -s nocasematch extglob case "$(uname -sm)" in "Linux"*) os="Linux" ;; + *"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;; "Darwin"*) os="Mac OS X" ;; "OpenBSD"*) os="OpenBSD" ;; "FreeBSD"* | "NetBSD"*) os="BSD" ;; "CYGWIN"*) os="Windows" ;; - *"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;; *) printf "%s\n" "Unknown OS detected: $(uname)"; exit 1 ;; esac From 90447980bd59a237384607b6ecf2dd4506d9c731 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 20:39:00 +1000 Subject: [PATCH 04/32] Better OS detection and distro detection --- neofetch | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/neofetch b/neofetch index 5560fb55..d0430b53 100755 --- a/neofetch +++ b/neofetch @@ -447,13 +447,12 @@ shopt -s nocasematch extglob # Operating System {{{ -case "$(uname -sm)" in - "Linux"*) os="Linux" ;; - *"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;; - "Darwin"*) os="Mac OS X" ;; - "OpenBSD"*) os="OpenBSD" ;; - "FreeBSD"* | "NetBSD"*) os="BSD" ;; - "CYGWIN"*) os="Windows" ;; +case "$(uname)" in + "Linux") os="Linux" ;; + "Darwin") os="$(sw_vers -productName)" ;; + "OpenBSD") os="OpenBSD" ;; + *"BSD") os="BSD" ;; + "CYGWIN"*) os="Windows" ;; *) printf "%s\n" "Unknown OS detected: $(uname)"; exit 1 ;; esac @@ -501,6 +500,10 @@ getdistro () { distro="$codename $osx_version $osx_build" ;; + "iPhone OS") + distro="iOS $(sw_vers -productVersion)" + ;; + "OpenBSD") distro="OpenBSD" ;; From f947031e38a8312a2de0725542a9db11cdb71339 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 20:48:47 +1000 Subject: [PATCH 05/32] Add uptime and packages support for iOS --- neofetch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index d0430b53..b8922e27 100755 --- a/neofetch +++ b/neofetch @@ -579,7 +579,7 @@ getuptime () { esac ;; - "Mac OS X" | *"BSD") + "Mac OS X" | "iPhone OS" | *"BSD") # Get boot time in seconds boot="$(sysctl -n kern.boottime)" boot="${boot/'{ sec = '}" @@ -656,7 +656,7 @@ getuptime () { getpackages () { case "$os" in - "Linux") + "Linux" | "iPhone OS") type -p pacman >/dev/null 2>&1 && \ packages="$(pacman -Qq --color never | wc -l)" @@ -947,6 +947,10 @@ getcpu () { cores=$(sysctl -n hw.ncpu) ;; + "iPhone OS") + cpu="" + ;; + *) case "$distro" in "OpenBSD"* | "FreeBSD"*) From 928ffa1cf2d1aa46174e15d9ec9020c37e0d55c4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 21:12:24 +1000 Subject: [PATCH 06/32] Add disk support and memory total to iOS --- neofetch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index b8922e27..5394cb7f 100755 --- a/neofetch +++ b/neofetch @@ -1240,6 +1240,10 @@ getmemory () { memused=$(((${memwired//.} + ${memactive//.} + ${memcompressed//.}) * 4 / 1024)) ;; + "iPhone OS") + memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) + ;; + "OpenBSD" | "BSD") case "$distro" in "OpenBSD"*) @@ -1585,7 +1589,7 @@ getfont () { getdisk () { # df flags case "$os" in - "Linux" | "Windows") df_flags="-h -l --total" ;; + "Linux" | "iPhone Os" | "Windows") df_flags="-h -l --total" ;; "Mac OS X") df_flags="-H / -l" ;; *"BSD") From ae4573066d82fdfcff9a2e337c9147cb6dd9a640 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 21:14:46 +1000 Subject: [PATCH 07/32] Add memory support to iOS --- neofetch | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 5394cb7f..a8578b0d 100755 --- a/neofetch +++ b/neofetch @@ -1232,7 +1232,7 @@ getmemory () { memtotal=$((mem[0] / 1024)) ;; - "Mac OS X") + "Mac OS X" | "iPhone OS") memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) memwired=$(vm_stat | awk '/wired/ { print $4 }') memactive=$(vm_stat | awk '/active / { printf $3 }') @@ -1240,10 +1240,6 @@ getmemory () { memused=$(((${memwired//.} + ${memactive//.} + ${memcompressed//.}) * 4 / 1024)) ;; - "iPhone OS") - memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) - ;; - "OpenBSD" | "BSD") case "$distro" in "OpenBSD"*) From da6add25ad223398422b5216c9620035c2ffb1f4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 21:18:03 +1000 Subject: [PATCH 08/32] Fix capitalization --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a8578b0d..3ef4eb0b 100755 --- a/neofetch +++ b/neofetch @@ -1585,7 +1585,7 @@ getfont () { getdisk () { # df flags case "$os" in - "Linux" | "iPhone Os" | "Windows") df_flags="-h -l --total" ;; + "Linux" | "iPhone OS" | "Windows") df_flags="-h -l --total" ;; "Mac OS X") df_flags="-H / -l" ;; *"BSD") From b4144d8299efc4dfabb1a8804442dea9a9c37014 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 21:20:03 +1000 Subject: [PATCH 09/32] Add localip support to iOS --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 3ef4eb0b..711976b1 100755 --- a/neofetch +++ b/neofetch @@ -1735,7 +1735,7 @@ getlocalip () { localip="$(ip route get 1 | awk '{print $NF;exit}')" ;; - "Mac OS X") + "Mac OS X" | "iPhone OS") localip="$(ipconfig getifaddr en0)" [ -z "$localip" ] && localip="$(ipconfig getifaddr en1)" ;; From 4d54c5a8d92d25c17ae0248a8a6680597f207458 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 21:22:00 +1000 Subject: [PATCH 10/32] Add ascii art for iOS --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 711976b1..3cefe2d7 100755 --- a/neofetch +++ b/neofetch @@ -2348,7 +2348,7 @@ colors () { setcolors 4 8 ;; - *"OS X"* ) + *"OS X"* | *"iOS"*) setcolors 2 3 1 1 5 4 ascii_distro="mac" ;; From 0e0df9d03eaac24000acb2a57c5c9176158d6aaa Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 11:29:55 +1000 Subject: [PATCH 11/32] Add birthday support to iOS --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 3cefe2d7..3c2f3c32 100755 --- a/neofetch +++ b/neofetch @@ -1779,8 +1779,8 @@ getusers () { getbirthday () { case "$os" in - "Linux") - birthday="$(ls -alct --full-time / | awk '/lost\+found/ {printf $6 " " $7}')" + "linux" | "iPhone OS") + birthday="$(ls -alct --full-time / | awk '/lost\+found|private/ {printf $6 " " $7}')" date_cmd="$(date -d"$birthday" "$birthday_format")" ;; From 16f395c462c539a241f1d26290ac8d04859d499b Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 12:42:36 +1000 Subject: [PATCH 12/32] Don't print CPU if it's empty --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 3c2f3c32..12ebe9d4 100755 --- a/neofetch +++ b/neofetch @@ -1051,8 +1051,7 @@ getcpu () { # Trim whitespace cpu=${cpu//+( )/ } - # Add CPU info bar - prin "$subtitle" "$cpu" + [ ! -z "$cpu" ] && prin "$subtitle" "$cpu" if [ "$cpu_display" != "off" ]; then cpu_usage="$(ps aux | awk 'BEGIN { sum = 0 } { sum += $3 }; END { print sum }')" From 609005874a62076f5184f071b7acd9dff7ed14aa Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 12:45:09 +1000 Subject: [PATCH 13/32] Remove CPU block --- neofetch | 4 ---- 1 file changed, 4 deletions(-) diff --git a/neofetch b/neofetch index 12ebe9d4..e8db1d5c 100755 --- a/neofetch +++ b/neofetch @@ -947,10 +947,6 @@ getcpu () { cores=$(sysctl -n hw.ncpu) ;; - "iPhone OS") - cpu="" - ;; - *) case "$distro" in "OpenBSD"* | "FreeBSD"*) From 38f9ebcb4cc1699f7613b38bd9278a37917e49b8 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 7 May 2016 13:32:47 +1000 Subject: [PATCH 14/32] Fix CPU output on ios --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index e8db1d5c..e19836fe 100755 --- a/neofetch +++ b/neofetch @@ -947,6 +947,7 @@ getcpu () { cores=$(sysctl -n hw.ncpu) ;; + "iPhone OS") ;; *) case "$distro" in "OpenBSD"* | "FreeBSD"*) From 2fd316eb9c5938acbbd1586bda64cb223ab83159 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 10:06:49 +1000 Subject: [PATCH 15/32] Fix iphone model appearing in distro output --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index e19836fe..c6f23b53 100755 --- a/neofetch +++ b/neofetch @@ -501,7 +501,8 @@ getdistro () { ;; "iPhone OS") - distro="iOS $(sw_vers -productVersion)" + ios_version="$(sw_vers -productVersion)" + distro="iOS ${ios_version/ *}" ;; "OpenBSD") From e4a55b8d76f7d48b7c3e85e2f66ae23a5ab93f7e Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 10:11:37 +1000 Subject: [PATCH 16/32] Possible fix for model appearing in output --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index c6f23b53..63f24d5a 100755 --- a/neofetch +++ b/neofetch @@ -501,8 +501,7 @@ getdistro () { ;; "iPhone OS") - ios_version="$(sw_vers -productVersion)" - distro="iOS ${ios_version/ *}" + distro="iOS $(sw_vers -productVersion 2>/dev/null)" ;; "OpenBSD") From e8f9f44091567a2f3c33dac2d7c9793e3eae15ca Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 10:17:17 +1000 Subject: [PATCH 17/32] Fix iphone model appearing in distro output --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 63f24d5a..166bf969 100755 --- a/neofetch +++ b/neofetch @@ -501,7 +501,8 @@ getdistro () { ;; "iPhone OS") - distro="iOS $(sw_vers -productVersion 2>/dev/null)" + distro="iOS $(sw_vers -productVersion)" + distro=${distro% *} ;; "OpenBSD") From 2cd662d21e17b5184d00e08d3b836d0222cff994 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 10:19:02 +1000 Subject: [PATCH 18/32] Unfixable --- neofetch | 1 - 1 file changed, 1 deletion(-) diff --git a/neofetch b/neofetch index 166bf969..e19836fe 100755 --- a/neofetch +++ b/neofetch @@ -502,7 +502,6 @@ getdistro () { "iPhone OS") distro="iOS $(sw_vers -productVersion)" - distro=${distro% *} ;; "OpenBSD") From 7c24e19264416de5891d536f49e9efc95bc6bce6 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 10:25:12 +1000 Subject: [PATCH 19/32] Use awk instead for sw_vers --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index e19836fe..67a192bb 100755 --- a/neofetch +++ b/neofetch @@ -501,7 +501,7 @@ getdistro () { ;; "iPhone OS") - distro="iOS $(sw_vers -productVersion)" + distro="iOS $(sw_vers | awk '/ProductVersion:/ {printf $2}')" ;; "OpenBSD") From 421f1ad52d9a6f2b7569dcc7789079cca1067e77 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 11:00:13 +1000 Subject: [PATCH 20/32] Fix iOS version --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 67a192bb..da42867a 100755 --- a/neofetch +++ b/neofetch @@ -501,7 +501,7 @@ getdistro () { ;; "iPhone OS") - distro="iOS $(sw_vers | awk '/ProductVersion:/ {printf $2}')" + distro="iOS $(awk '/OS-Version:/ {printf $4}' /var/logs/AppleSupport/general.log)" ;; "OpenBSD") From 7682be552251c5e1ad1e50d6f3ad80d7a274aa5f Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 11:31:14 +1000 Subject: [PATCH 21/32] Remove model name from distro output --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index da42867a..3afe5551 100755 --- a/neofetch +++ b/neofetch @@ -502,6 +502,7 @@ getdistro () { "iPhone OS") distro="iOS $(awk '/OS-Version:/ {printf $4}' /var/logs/AppleSupport/general.log)" + distro=$(printf "%s" "$distro" | awk '{printf $1 $2}') ;; "OpenBSD") From 59eae428dd4c44bf0f1d3e8e0a829fca34e288df Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 11:33:32 +1000 Subject: [PATCH 22/32] revert previous commit --- neofetch | 1 - 1 file changed, 1 deletion(-) diff --git a/neofetch b/neofetch index 3afe5551..da42867a 100755 --- a/neofetch +++ b/neofetch @@ -502,7 +502,6 @@ getdistro () { "iPhone OS") distro="iOS $(awk '/OS-Version:/ {printf $4}' /var/logs/AppleSupport/general.log)" - distro=$(printf "%s" "$distro" | awk '{printf $1 $2}') ;; "OpenBSD") From 70891895214cf74d2640151fe9a31e1dfd6a345a Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 11:35:22 +1000 Subject: [PATCH 23/32] Test? --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index da42867a..60dc8072 100755 --- a/neofetch +++ b/neofetch @@ -501,7 +501,8 @@ getdistro () { ;; "iPhone OS") - distro="iOS $(awk '/OS-Version:/ {printf $4}' /var/logs/AppleSupport/general.log)" + # distro="iOS $(awk '/OS-Version:/ {printf $4}' /var/logs/AppleSupport/general.log)" + distro="iOS" ;; "OpenBSD") From 68cb460f78190465c155069472d0b2a80de486ce Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 May 2016 11:41:45 +1000 Subject: [PATCH 24/32] Fix model bug for realsies this time --- neofetch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 60dc8072..f50496c9 100755 --- a/neofetch +++ b/neofetch @@ -501,8 +501,10 @@ getdistro () { ;; "iPhone OS") - # distro="iOS $(awk '/OS-Version:/ {printf $4}' /var/logs/AppleSupport/general.log)" - distro="iOS" + distro="iOS $(sw_vers -productVersion)" + + # "uname -m" doesn't print architecture on iOS so we force it off. + os_arch="off" ;; "OpenBSD") From 5e7563042ccf2e62d8951ae2d48f5da54cc9d876 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 13:32:44 +1000 Subject: [PATCH 25/32] added CPU/GPU table for iOS --- idevicehw.csv | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ neofetch | 10 +++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 idevicehw.csv diff --git a/idevicehw.csv b/idevicehw.csv new file mode 100644 index 00000000..411bb95b --- /dev/null +++ b/idevicehw.csv @@ -0,0 +1,55 @@ +iPhone1,1|Samsung S5L8900 @ 412MHz|1|PowerVR MBX Lite 3D +iPhone1,2|Samsung S5L8900 @ 412MHz|1|PowerVR MBX Lite 3D +iPhone2,1|Samsung S5PC100 @ 600MHz|1|PowerVR SGX535 +iPhone3,1|Apple A4 @ 800MHz|1|PowerVR SGX535 +iPhone3,2|Apple A4 @ 800MHz|1|PowerVR SGX535 +iPhone3,3|Apple A4 @ 800MHz|1|PowerVR SGX535 +iPhone4,1|Apple A5 @ 800MHz|2|PowerVR SGX543MP2 +iPhone5,1|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 +iPhone5,2|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 +iPhone5,3|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 +iPhone5,4|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 +iPhone6,1|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPhone6,2|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPhone7,1|Apple A8 @ 1.4GHz|2|PowerVR GX6450 +iPhone7,2|Apple A8 @ 1.4GHz|2|PowerVR GX6450 +iPhone8,1|Apple A9 @ 1.85GHz|2|PowerVR GT7600 +iPhone8,2|Apple A9 @ 1.85GHz|2|PowerVR GT7600 +iPhone8,4|Apple A9 @ 1.85GHz|2|PowerVR GT7600 +iPod1,1|Samsung S5L8900 @ 412MHz|1|PowerVR MBX Lite +iPod2,1|Samsung S5L8720 @ 533MHz|1|PowerVR MBX Lite +iPod3,1|Samsung S5L8922 @ 600MHz|1|PowerVR SGX535 +iPod4,1|Apple A4 @ 800MHz|1|PowerVR SGX535 +iPod5,1|Apple A5 @ 800MHz|2|PowerVR SGX543MP2 +iPod7,1|Apple A8 @ 1.1GHz|2|PowerVR GX6450 +iPad1,1|Apple A4 @ 1GHz|1|PowerVR SGX535 +iPad2,1|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad2,2|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad2,3|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad2,4|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad2,5|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad2,6|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad2,7|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 +iPad3,1|Apple A5X @ 1GHz|2|PowerVR SGX543MP4 +iPad3,2|Apple A5X @ 1GHz|2|PowerVR SGX543MP4 +iPad3,3|Apple A5X @ 1GHz|2|PowerVR SGX543MP4 +iPad3,4|Apple A6X @ 1.4GHz|2|PowerVR SGX554MP4 +iPad3,5|Apple A6X @ 1.4GHz|2|PowerVR SGX554MP4 +iPad3,6|Apple A6X @ 1.4GHz|2|PowerVR SGX554MP4 +iPad4,1|Apple A7 @ 1.4GHz|2|PowerVR G6430 +iPad4,2|Apple A7 @ 1.4GHz|2|PowerVR G6430 +iPad4,3|Apple A7 @ 1.4GHz|2|PowerVR G6430 +iPad4,4|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPad4,5|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPad4,6|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPad4,7|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPad4,8|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPad4,9|Apple A7 @ 1.3GHz|2|PowerVR G6430 +iPad5,1|Apple A8 @ 1.5GHz|2|PowerVR GX6450 +iPad5,2|Apple A8 @ 1.5GHz|2|PowerVR GX6450 +iPad5,3|Apple A8X @ 1.5GHz|3|PowerVR GXA6850 +iPad5,4|Apple A8X @ 1.5GHz|3|PowerVR GXA6850 +iPad6,3|Apple A9X @ 2.16GHz|2|PowerVR 7XT +iPad6,4|Apple A9X @ 2.16GHz|2|PowerVR 7XT +iPad6,7|Apple A9X @ 2.26GHz|2|PowerVR 7XT +iPad6,8|Apple A9X @ 2.26GHz|2|PowerVR 7XT diff --git a/neofetch b/neofetch index f50496c9..efdc18de 100755 --- a/neofetch +++ b/neofetch @@ -950,7 +950,11 @@ getcpu () { cores=$(sysctl -n hw.ncpu) ;; - "iPhone OS") ;; + "iPhone OS") + cpu="$(awk -F '|' '/$(uname -m)/ {printf $2}' idevicehw.csv)" + cores="$(awk -F '|' '/$(uname -m)/ {printf $3}' idevicehw.csv)" + ;; + *) case "$distro" in "OpenBSD"* | "FreeBSD"*) @@ -1162,6 +1166,10 @@ getgpu () { fi ;; + "iPhone OS") + gpu=$(awk -F '|' '/$(uname -m)/ {printf $4}' idevicehw.csv)" + ;; + *"BSD") case "$distro" in "FreeBSD"*) From 3376a7d697f00bfb0d7a752e1ca359af7f147d08 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 13:40:55 +1000 Subject: [PATCH 26/32] oops, forgot a quote --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index efdc18de..16f82231 100755 --- a/neofetch +++ b/neofetch @@ -1167,7 +1167,7 @@ getgpu () { ;; "iPhone OS") - gpu=$(awk -F '|' '/$(uname -m)/ {printf $4}' idevicehw.csv)" + gpu="$(awk -F '|' '/$(uname -m)/ {printf $4}' idevicehw.csv)" ;; *"BSD") From 94430374cb13f2893532581193b8c3d8b59ccedd Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 13:46:19 +1000 Subject: [PATCH 27/32] only call uname -m once, might fix awk --- neofetch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 16f82231..b53ff6db 100755 --- a/neofetch +++ b/neofetch @@ -502,6 +502,7 @@ getdistro () { "iPhone OS") distro="iOS $(sw_vers -productVersion)" + idevice="$(uname -m)" # "uname -m" doesn't print architecture on iOS so we force it off. os_arch="off" @@ -951,8 +952,8 @@ getcpu () { ;; "iPhone OS") - cpu="$(awk -F '|' '/$(uname -m)/ {printf $2}' idevicehw.csv)" - cores="$(awk -F '|' '/$(uname -m)/ {printf $3}' idevicehw.csv)" + cpu="$(awk -F '|' '/$idevice/ {printf $2}' idevicehw.csv)" + cores="$(awk -F '|' '/$idevice/ {printf $3}' idevicehw.csv)" ;; *) @@ -1167,7 +1168,7 @@ getgpu () { ;; "iPhone OS") - gpu="$(awk -F '|' '/$(uname -m)/ {printf $4}' idevicehw.csv)" + gpu="$(awk -F '|' '/$idevice/ {printf $4}' idevicehw.csv)" ;; *"BSD") From a57c3200658991ec2d25a36ced342aa085f4aeda Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 14:44:15 +1000 Subject: [PATCH 28/32] moved csv into neofetch file directly --- neofetch | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index b53ff6db..d34abf77 100755 --- a/neofetch +++ b/neofetch @@ -952,8 +952,92 @@ getcpu () { ;; "iPhone OS") - cpu="$(awk -F '|' '/$idevice/ {printf $2}' idevicehw.csv)" - cores="$(awk -F '|' '/$idevice/ {printf $3}' idevicehw.csv)" + case "$(uname -m)" in + "iPhone1,1" | "iPhone1,2" | "iPod1,1") + cpu="Samsung S5L8900 @ 412MHz" + cores="1" + ;; + "iPhone2,1") + cpu="Samsung S5PC100 @ 600MHz" + cores="1" + ;; + "iPhone3,1" | "iPhone3,2" | "iPhone3,3" | "iPod4,1") + cpu="Apple A4 @ 800MHz" + cores="1" + ;; + "iPhone4,1" | "iPod5,1") + cpu="Apple A5 @ 800MHz" + cores="2" + ;; + "iPhone5,1" | "iPhone5,2" | "iPhone5,3" | "iPhone5,4") + cpu="Apple A6 @ 1.3GHz" + cores="2" + ;; + "iPhone6,1" | "iPhone6,2") + cpu="Apple A7 @ 1.3GHz" + cores="2" + ;; + "iPhone7,1" | "iPhone7,2") + cpu="Apple A8 @ 1.4GHz" + cores="2" + ;; + "iPhone8,1" | "iPhone8,2" | "iPhone8,4") + cpu="Apple A9 @ 1.85GHz" + cores="2" + ;; + "iPod2,1") + cpu="Samsung S5L8720 @ 533MHz" + cores="1" + ;; + "iPod3,1") + cpu="Samsung S5L8922 @ 600MHz" + cores="1" + ;; + "iPod7,1") + cpu="Apple A8 @ 1.1GHz" + cores="2" + ;; + "iPad1,1") + cpu="Apple A4 @ 1GHz" + cores="1" + ;; + "iPad2,1" | "iPad2,2" | "iPad2,3" | "iPad2,4" | "iPad2,5" | "iPad2,6" | "iPad2,7") + cpu="Apple A5 @ 1GHz" + cores="2" + ;; + "iPad3,1" | "iPad3,2" | "iPad3,3") + cpu="Apple A5X @ 1GHz" + cores="2" + ;; + "iPad3,4" | "iPad3,5" | "iPad3,6") + cpu="Apple A6X @ 1.4GHz" + cores="2" + ;; + "iPad4,1" | "iPad4,2" | "iPad4,3") + cpu="Apple A7 @ 1.4GHz" + cores="2" + ;; + "iPad4,4" | "iPad4,5" | "iPad4,6" | "iPad4,7" | "iPad4,8" | "iPad4,9") + cpu="Apple A7 @ 1.4GHz" + cores="2" + ;; + "iPad5,1" | "iPad5,2") + cpu="Apple A8 @ 1.5GHz" + cores="2" + ;; + "iPad5,3" | "iPad5,4") + cpu="Apple A8X @ 1.5GHz" + cores="3" + ;; + "iPad6,3" | "iPad6,4") + cpu="Apple A9X @ 2.16GHz" + cores="2" + ;; + "iPad6,7" | "iPad6,8") + cpu="Apple A9X @ 2.26GHz" + cores="2" + ;; + esac ;; *) @@ -1168,7 +1252,24 @@ getgpu () { ;; "iPhone OS") - gpu="$(awk -F '|' '/$idevice/ {printf $4}' idevicehw.csv)" + case "$(uname -m)" in + "iPhone1,1" | "iPhone1,2") gpu="PowerVR MBX Lite 3D" ;; + "iPhone2,1" | "iPhone3,1" | "iPhone3,2" | "iPhone3,3" | "iPod3,1" | "iPod4,1" | "iPad1,1") gpu="PowerVR SGX535" ;; + "iPhone4,1" | "iPad2,1" | "iPad2,2" | "iPad2,3" | "iPad2,4" | "iPad2,5" | "iPad2,6" | "iPad2,7" | "iPod5,1") + gpu="PowerVR SGX543MP2" + ;; + "iPhone5,1" | "iPhone5,2" | "iPhone5,3" | "iPhone5,4") gpu="PowerVR SGX543MP3" ;; + "iPhone6,1" | "iPhone6,2" | "iPad4,1" | "iPad4,2" | "iPad4,3" | "iPad4,4" | "iPad4,5" | "iPad4,6" | "iPad4,7" | "iPad4,8" | "iPad4,9") + gpu="PowerVR G6430" + ;; + "iPhone7,1" | "iPhone7,2" | "iPod7,1" | "iPad5,1" | "iPad5,2") gpu="PowerVR GX6450" ;; + "iPhone8,1" | "iPhone8,2" | "iPhone8,4") gpu="PowerVR GT7600" ;; + "iPod1,1" | "iPod2,1") gpu="PowerVR MBX Lite" ;; + "iPad3,1" | "iPad3,2" | "iPad3,3") gpu="PowerVR SGX534MP4" ;; + "iPad3,4" | "iPad3,5" | "iPad3,6") gpu="PowerVR SGX554MP4" ;; + "iPad5,3" | "iPad5,4") gpu="PowerVR GXA6850" ;; + "iPad6,3" | "iPad6,4" | "iPad6,7" | "iPad6,8") gpu="PowerVR 7XT" ;; + esac ;; *"BSD") From 8d83d3b11417b29270854ad997c2d3b7caf933bc Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 14:48:05 +1000 Subject: [PATCH 29/32] removed csv file as it is now unneeded --- idevicehw.csv | 55 --------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 idevicehw.csv diff --git a/idevicehw.csv b/idevicehw.csv deleted file mode 100644 index 411bb95b..00000000 --- a/idevicehw.csv +++ /dev/null @@ -1,55 +0,0 @@ -iPhone1,1|Samsung S5L8900 @ 412MHz|1|PowerVR MBX Lite 3D -iPhone1,2|Samsung S5L8900 @ 412MHz|1|PowerVR MBX Lite 3D -iPhone2,1|Samsung S5PC100 @ 600MHz|1|PowerVR SGX535 -iPhone3,1|Apple A4 @ 800MHz|1|PowerVR SGX535 -iPhone3,2|Apple A4 @ 800MHz|1|PowerVR SGX535 -iPhone3,3|Apple A4 @ 800MHz|1|PowerVR SGX535 -iPhone4,1|Apple A5 @ 800MHz|2|PowerVR SGX543MP2 -iPhone5,1|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 -iPhone5,2|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 -iPhone5,3|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 -iPhone5,4|Apple A6 @ 1.3GHz|2|PowerVR SGX543MP3 -iPhone6,1|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPhone6,2|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPhone7,1|Apple A8 @ 1.4GHz|2|PowerVR GX6450 -iPhone7,2|Apple A8 @ 1.4GHz|2|PowerVR GX6450 -iPhone8,1|Apple A9 @ 1.85GHz|2|PowerVR GT7600 -iPhone8,2|Apple A9 @ 1.85GHz|2|PowerVR GT7600 -iPhone8,4|Apple A9 @ 1.85GHz|2|PowerVR GT7600 -iPod1,1|Samsung S5L8900 @ 412MHz|1|PowerVR MBX Lite -iPod2,1|Samsung S5L8720 @ 533MHz|1|PowerVR MBX Lite -iPod3,1|Samsung S5L8922 @ 600MHz|1|PowerVR SGX535 -iPod4,1|Apple A4 @ 800MHz|1|PowerVR SGX535 -iPod5,1|Apple A5 @ 800MHz|2|PowerVR SGX543MP2 -iPod7,1|Apple A8 @ 1.1GHz|2|PowerVR GX6450 -iPad1,1|Apple A4 @ 1GHz|1|PowerVR SGX535 -iPad2,1|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad2,2|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad2,3|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad2,4|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad2,5|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad2,6|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad2,7|Apple A5 @ 1GHz|2|PowerVR SGX543MP2 -iPad3,1|Apple A5X @ 1GHz|2|PowerVR SGX543MP4 -iPad3,2|Apple A5X @ 1GHz|2|PowerVR SGX543MP4 -iPad3,3|Apple A5X @ 1GHz|2|PowerVR SGX543MP4 -iPad3,4|Apple A6X @ 1.4GHz|2|PowerVR SGX554MP4 -iPad3,5|Apple A6X @ 1.4GHz|2|PowerVR SGX554MP4 -iPad3,6|Apple A6X @ 1.4GHz|2|PowerVR SGX554MP4 -iPad4,1|Apple A7 @ 1.4GHz|2|PowerVR G6430 -iPad4,2|Apple A7 @ 1.4GHz|2|PowerVR G6430 -iPad4,3|Apple A7 @ 1.4GHz|2|PowerVR G6430 -iPad4,4|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPad4,5|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPad4,6|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPad4,7|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPad4,8|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPad4,9|Apple A7 @ 1.3GHz|2|PowerVR G6430 -iPad5,1|Apple A8 @ 1.5GHz|2|PowerVR GX6450 -iPad5,2|Apple A8 @ 1.5GHz|2|PowerVR GX6450 -iPad5,3|Apple A8X @ 1.5GHz|3|PowerVR GXA6850 -iPad5,4|Apple A8X @ 1.5GHz|3|PowerVR GXA6850 -iPad6,3|Apple A9X @ 2.16GHz|2|PowerVR 7XT -iPad6,4|Apple A9X @ 2.16GHz|2|PowerVR 7XT -iPad6,7|Apple A9X @ 2.26GHz|2|PowerVR 7XT -iPad6,8|Apple A9X @ 2.26GHz|2|PowerVR 7XT From 09660208ec076e85ed574ddb2d96a0f25921b7e0 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 14:50:19 +1000 Subject: [PATCH 30/32] removed unneeded variable --- neofetch | 1 - 1 file changed, 1 deletion(-) diff --git a/neofetch b/neofetch index d34abf77..82b16ebe 100755 --- a/neofetch +++ b/neofetch @@ -502,7 +502,6 @@ getdistro () { "iPhone OS") distro="iOS $(sw_vers -productVersion)" - idevice="$(uname -m)" # "uname -m" doesn't print architecture on iOS so we force it off. os_arch="off" From 55092808b428394391ec4dbcfbb71524a97d2c5b Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 9 May 2016 01:17:18 +1000 Subject: [PATCH 31/32] Change case formatting and only call uname once --- neofetch | 125 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 89 insertions(+), 36 deletions(-) diff --git a/neofetch b/neofetch index 82b16ebe..58be8244 100755 --- a/neofetch +++ b/neofetch @@ -950,92 +950,113 @@ getcpu () { cores=$(sysctl -n hw.ncpu) ;; - "iPhone OS") - case "$(uname -m)" in + "iPhone OS") + ios_model=${ios_model:-$(uname -m)} + case "$ios_model" in "iPhone1,1" | "iPhone1,2" | "iPod1,1") cpu="Samsung S5L8900 @ 412MHz" cores="1" - ;; + ;; + "iPhone2,1") cpu="Samsung S5PC100 @ 600MHz" cores="1" - ;; + ;; + "iPhone3,1" | "iPhone3,2" | "iPhone3,3" | "iPod4,1") cpu="Apple A4 @ 800MHz" cores="1" - ;; + ;; + "iPhone4,1" | "iPod5,1") cpu="Apple A5 @ 800MHz" cores="2" - ;; + ;; + "iPhone5,1" | "iPhone5,2" | "iPhone5,3" | "iPhone5,4") cpu="Apple A6 @ 1.3GHz" cores="2" - ;; + ;; + "iPhone6,1" | "iPhone6,2") cpu="Apple A7 @ 1.3GHz" cores="2" - ;; + ;; + "iPhone7,1" | "iPhone7,2") cpu="Apple A8 @ 1.4GHz" cores="2" - ;; + ;; + "iPhone8,1" | "iPhone8,2" | "iPhone8,4") cpu="Apple A9 @ 1.85GHz" cores="2" - ;; + ;; + "iPod2,1") cpu="Samsung S5L8720 @ 533MHz" cores="1" - ;; + ;; + "iPod3,1") cpu="Samsung S5L8922 @ 600MHz" cores="1" - ;; + ;; + "iPod7,1") cpu="Apple A8 @ 1.1GHz" cores="2" - ;; + ;; + "iPad1,1") cpu="Apple A4 @ 1GHz" cores="1" - ;; + ;; + "iPad2,1" | "iPad2,2" | "iPad2,3" | "iPad2,4" | "iPad2,5" | "iPad2,6" | "iPad2,7") cpu="Apple A5 @ 1GHz" cores="2" - ;; + ;; + "iPad3,1" | "iPad3,2" | "iPad3,3") cpu="Apple A5X @ 1GHz" cores="2" - ;; + ;; + "iPad3,4" | "iPad3,5" | "iPad3,6") cpu="Apple A6X @ 1.4GHz" cores="2" - ;; + ;; + "iPad4,1" | "iPad4,2" | "iPad4,3") cpu="Apple A7 @ 1.4GHz" cores="2" - ;; + ;; + "iPad4,4" | "iPad4,5" | "iPad4,6" | "iPad4,7" | "iPad4,8" | "iPad4,9") cpu="Apple A7 @ 1.4GHz" cores="2" - ;; + ;; + "iPad5,1" | "iPad5,2") cpu="Apple A8 @ 1.5GHz" cores="2" - ;; + ;; + "iPad5,3" | "iPad5,4") cpu="Apple A8X @ 1.5GHz" cores="3" - ;; + ;; + "iPad6,3" | "iPad6,4") cpu="Apple A9X @ 2.16GHz" cores="2" - ;; + ;; + "iPad6,7" | "iPad6,8") cpu="Apple A9X @ 2.26GHz" cores="2" - ;; + ;; esac ;; @@ -1251,23 +1272,55 @@ getgpu () { ;; "iPhone OS") - case "$(uname -m)" in - "iPhone1,1" | "iPhone1,2") gpu="PowerVR MBX Lite 3D" ;; - "iPhone2,1" | "iPhone3,1" | "iPhone3,2" | "iPhone3,3" | "iPod3,1" | "iPod4,1" | "iPad1,1") gpu="PowerVR SGX535" ;; + ios_model=${ios_model:-$(uname -m)} + case "$ios_model" in + "iPhone1,1" | "iPhone1,2") + gpu="PowerVR MBX Lite 3D" + ;; + + "iPhone2,1" | "iPhone3,1" | "iPhone3,2" | "iPhone3,3" | "iPod3,1" | "iPod4,1" | "iPad1,1") + gpu="PowerVR SGX535" + ;; + "iPhone4,1" | "iPad2,1" | "iPad2,2" | "iPad2,3" | "iPad2,4" | "iPad2,5" | "iPad2,6" | "iPad2,7" | "iPod5,1") gpu="PowerVR SGX543MP2" - ;; - "iPhone5,1" | "iPhone5,2" | "iPhone5,3" | "iPhone5,4") gpu="PowerVR SGX543MP3" ;; + ;; + + "iPhone5,1" | "iPhone5,2" | "iPhone5,3" | "iPhone5,4") + gpu="PowerVR SGX543MP3" + ;; + "iPhone6,1" | "iPhone6,2" | "iPad4,1" | "iPad4,2" | "iPad4,3" | "iPad4,4" | "iPad4,5" | "iPad4,6" | "iPad4,7" | "iPad4,8" | "iPad4,9") gpu="PowerVR G6430" - ;; - "iPhone7,1" | "iPhone7,2" | "iPod7,1" | "iPad5,1" | "iPad5,2") gpu="PowerVR GX6450" ;; - "iPhone8,1" | "iPhone8,2" | "iPhone8,4") gpu="PowerVR GT7600" ;; - "iPod1,1" | "iPod2,1") gpu="PowerVR MBX Lite" ;; - "iPad3,1" | "iPad3,2" | "iPad3,3") gpu="PowerVR SGX534MP4" ;; - "iPad3,4" | "iPad3,5" | "iPad3,6") gpu="PowerVR SGX554MP4" ;; - "iPad5,3" | "iPad5,4") gpu="PowerVR GXA6850" ;; - "iPad6,3" | "iPad6,4" | "iPad6,7" | "iPad6,8") gpu="PowerVR 7XT" ;; + ;; + + "iPhone7,1" | "iPhone7,2" | "iPod7,1" | "iPad5,1" | "iPad5,2") + gpu="PowerVR GX6450" + ;; + + "iPhone8,1" | "iPhone8,2" | "iPhone8,4") + gpu="PowerVR GT7600" + ;; + + "iPod1,1" | "iPod2,1") + gpu="PowerVR MBX Lite" + ;; + + "iPad3,1" | "iPad3,2" | "iPad3,3") + gpu="PowerVR SGX534MP4" + ;; + + "iPad3,4" | "iPad3,5" | "iPad3,6") + gpu="PowerVR SGX554MP4" + ;; + + "iPad5,3" | "iPad5,4") + gpu="PowerVR GXA6850" + ;; + + "iPad6,3" | "iPad6,4" | "iPad6,7" | "iPad6,8") + gpu="PowerVR 7XT" + ;; esac ;; From f8b0478f462a6c99fbab362ebbc626dbe9a4fc3e Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 9 May 2016 01:20:37 +1000 Subject: [PATCH 32/32] Add iOS dependencies to Readme --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 4560d194..27abc0d2 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,17 @@ Checkout the wiki, I've updated/added some new pages!
- `procps-ng` - Not required on OS X +##### iOS + +These dependencies can all be installed through Cydia. + +- `Core Utilities` +- `Core Utilities (/bin)` +- `Darwin Tools` +- `system-cmds` +- `bc` +- `Gawk` +- `grep` ### Optional dependencies: