mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-15 16:37:13 +00:00
getsong, check to see if music player is running
This commit is contained in:
6
fetch
6
fetch
@@ -1098,16 +1098,16 @@ getmemory () {
|
||||
# Song {{{
|
||||
|
||||
getsong () {
|
||||
if type -p mpc >/dev/null 2>&1; then
|
||||
if pgrep "mpd" >/dev/null 2>&1; then
|
||||
song="$(mpc current)"
|
||||
|
||||
elif type -p cmus >/dev/null 2>&1; then
|
||||
elif pgrep "cmus" >/dev/null 2>&1; then
|
||||
song="$(cmus-remote -Q | grep "tag artist\|title")"
|
||||
song=${song/tag artist }
|
||||
song=${song/tag title/-}
|
||||
song=${song//[[:space:]]/ }
|
||||
|
||||
elif type -p mocp >/dev/null 2>&1; then
|
||||
elif pgrep "mocp" >/dev/null 2>&1; then
|
||||
song="$(mocp -Q "%artist - %song")"
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user