From 97fc5f34b73dbcf97cfe4dd3a947af59127d41c8 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 29 Mar 2016 10:04:59 +1100 Subject: [PATCH] Don't use as many ps flags --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index c4b16ff6..fd49d52e 100755 --- a/neofetch +++ b/neofetch @@ -1163,7 +1163,7 @@ getsong () { song="$(mocp -Q "%artist - %song" 2>/dev/null)" state="$(mocp -Q "%state" 2>/dev/null)" - elif [ -n "$(ps aux | awk '!(/awk/) && /spotify/')" ]; then + elif [ -n "$(ps x | awk '!(/awk/) && /spotify/')" ]; then case "$os" in "Linux") # This command is way too long @@ -1184,11 +1184,11 @@ getsong () { ;; esac - elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /Google Play Music Desktop Player/')" ] && type -p gpmdp >/dev/null 2>&1; then + elif [ -n "$(ps x | awk '!(/awk/ || /Helper/) && /Google Play Music Desktop Player/')" ] && type -p gpmdp >/dev/null 2>&1; then song="$(gpmdp current)" state="$(gpmdp status)" - elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then + elif [ -n "$(ps x | 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')"