get_song: stop iTunesHelper from being detected

This commit is contained in:
Andrew Titmuss 2018-10-22 22:21:12 +11:00
parent fb23cc69d6
commit 936b3b6b73
No known key found for this signature in database
GPG Key ID: 8AF42975C787E0B2
1 changed files with 1 additions and 1 deletions

View File

@ -2358,7 +2358,7 @@ get_song() {
printf -v players "|%s" "${players[@]}"
player="$(ps aux | awk -v pattern="(${players:1})" \
'!/ awk / && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
'!/ awk / && !/iTunesHelper/ && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
[[ "$music_player" && "$music_player" != "auto" ]] && \
player="$music_player"