Add uptime and packages support for iOS
This commit is contained in:
parent
90447980bd
commit
f947031e38
1 changed files with 6 additions and 2 deletions
8
neofetch
8
neofetch
|
@ -579,7 +579,7 @@ getuptime () {
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X" | *"BSD")
|
"Mac OS X" | "iPhone OS" | *"BSD")
|
||||||
# Get boot time in seconds
|
# Get boot time in seconds
|
||||||
boot="$(sysctl -n kern.boottime)"
|
boot="$(sysctl -n kern.boottime)"
|
||||||
boot="${boot/'{ sec = '}"
|
boot="${boot/'{ sec = '}"
|
||||||
|
@ -656,7 +656,7 @@ getuptime () {
|
||||||
|
|
||||||
getpackages () {
|
getpackages () {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux")
|
"Linux" | "iPhone OS")
|
||||||
type -p pacman >/dev/null 2>&1 && \
|
type -p pacman >/dev/null 2>&1 && \
|
||||||
packages="$(pacman -Qq --color never | wc -l)"
|
packages="$(pacman -Qq --color never | wc -l)"
|
||||||
|
|
||||||
|
@ -947,6 +947,10 @@ getcpu () {
|
||||||
cores=$(sysctl -n hw.ncpu)
|
cores=$(sysctl -n hw.ncpu)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"iPhone OS")
|
||||||
|
cpu=""
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
"OpenBSD"* | "FreeBSD"*)
|
"OpenBSD"* | "FreeBSD"*)
|
||||||
|
|
Loading…
Reference in a new issue