Don't use as many ps flags
This commit is contained in:
parent
aa6ed1b216
commit
97fc5f34b7
1 changed files with 3 additions and 3 deletions
6
neofetch
6
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')"
|
||||
|
||||
|
|
Loading…
Reference in a new issue