song: Fix detection.
This commit is contained in:
parent
94362674f2
commit
01bd13a3b5
1 changed files with 2 additions and 1 deletions
3
neofetch
3
neofetch
|
@ -2340,7 +2340,8 @@ get_song() {
|
|||
)
|
||||
|
||||
printf -v players "|%s" "${players[@]}"
|
||||
player="$(ps -e | awk -v pattern="(${players:1})$" '$0 ~ pattern {print $NF; exit}')"
|
||||
player="$(ps aux | awk -v pattern="(${players:1})" \
|
||||
'!/ awk / && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
|
||||
|
||||
[[ "$music_player" && "$music_player" != "auto" ]] && \
|
||||
player="$music_player"
|
||||
|
|
Loading…
Reference in a new issue