diff --git a/ufetch-macos b/ufetch-macos index ae974ff..f5bbb00 100755 --- a/ufetch-macos +++ b/ufetch-macos @@ -7,10 +7,11 @@ # user is already defined host="${HOSTNAME%%.*}" -os="$(system_profiler SPSoftwareDataType | grep 'System Version'| awk '{print $3, $4}')" -kernel="$(uname -v | cut -d' ' -f1-2)" +software="$(system_profiler SPSoftwareDataType)" +os=$(echo "$software" | grep 'System Version' -m 1) +kernel="$(echo "$software" | grep 'Kernel' -m 1)" uptime="$(uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | sed -e 's/^[ \t]*//')" -packages="$(find /usr/local/Homebrew/ -type d -name "Formula" -exec ls -1 {} \; | wc -l | awk '{print $1}')" +packages=( `brew list` `brew cask list` ) shell="$(basename ${SHELL})" WM="Quartz Compositor" @@ -42,10 +43,10 @@ tc="${rc}${bc}${c3}" # third color cat <