From 1616bf13418bf575b54d7b819bc5609c3909e23b Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sat, 12 Mar 2016 18:16:22 +1100 Subject: [PATCH] itunes support added --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 1ff3eead..90debdc0 100755 --- a/neofetch +++ b/neofetch @@ -1139,6 +1139,10 @@ getsong () { song=${song//'['*} ;; esac + elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then + song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " name of current track as string')" + state="$(osascript -e 'tell application "iTunes" to player state as string')" + else song="Unknown" fi