mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-16 17:07:12 +00:00
song: Fix detection.
This commit is contained in:
3
neofetch
3
neofetch
@@ -2340,7 +2340,8 @@ get_song() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
printf -v players "|%s" "${players[@]}"
|
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" ]] && \
|
[[ "$music_player" && "$music_player" != "auto" ]] && \
|
||||||
player="$music_player"
|
player="$music_player"
|
||||||
|
|||||||
Reference in New Issue
Block a user