diff --git a/neofetch b/neofetch index daf4f6f5..3789b7f0 100755 --- a/neofetch +++ b/neofetch @@ -926,14 +926,19 @@ get_wm_theme() { ;; "Quartz Compositor") - wm_theme="$(PlistBuddy -c "Print AppleAquaColorVariant" \ - "${HOME}/Library/Preferences/.GlobalPreferences.plist")" + global_preferences="${HOME}/Library/Preferences/.GlobalPreferences.plist" + wm_theme="$(PlistBuddy -c "Print AppleInterfaceStyle" "$global_preferences")" + wm_theme_color="$(PlistBuddy -c "Print AppleAquaColorVariant" "$global_preferences")" - if [[ -z "$wm_theme" ]] || ((wm_theme == 1)); then - wm_theme="Blue" + [[ -z "$wm_theme" ]] && wm_theme="Light" + + if [[ -z "$wm_theme_color" ]] || ((wm_theme_color == 1)); then + wm_theme_color="Blue" else - wm_theme="Graphite" + wm_theme_color="Graphite" fi + + wm_theme="$wm_theme_color ($wm_theme)" ;; *"Explorer") @@ -1522,7 +1527,7 @@ get_memory() { } get_song() { - player="$(ps -e | grep -m 1 -o -F \ + player="$(ps -e | grep -m 1 -o \ -e "Google Play" \ -e "Spotify" \ -e "amarok" \ @@ -1537,7 +1542,7 @@ get_song() { -e "exaile" \ -e "gnome-music" \ -e "guayadeque" \ - -e "iTunes.app" \ + -e "iTunes$" \ -e "juk" \ -e "lollypop" \ -e "mocp" \ @@ -1603,13 +1608,29 @@ get_song() { "Linux") get_song_dbus "spotify" ;; "Mac OS X") - song="$(osascript -e 'tell application "Spotify" to artist of current track as string & " - " & name of current track as string')" + song="$(osascript <= 4)) && printf "%s" "${1^}" + if ((bash_version >= 4)); then + printf "%s" "${1^}" + else + printf "%s" "$1" + fi } # COLORS