From cbf5be8596cbf363a1bd1986194cac68b3f7e195 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 7 Jun 2017 04:12:02 +0300 Subject: [PATCH] Update ufetch-macos --- ufetch-macos | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 <