mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 12:09:55 +00:00
Add cmus support to getsong
This commit is contained in:
9
fetch
9
fetch
@@ -839,7 +839,14 @@ getmemory () {
|
|||||||
|
|
||||||
# Get song
|
# Get song
|
||||||
getsong () {
|
getsong () {
|
||||||
song=$(mpc current 2>/dev/null || printf "%s" "Unknown")
|
if type -p mpc >/dev/null 2>&1; then
|
||||||
|
song="$(mpc current)"
|
||||||
|
elif type -p 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:]]/ }
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get Resolution
|
# Get Resolution
|
||||||
|
|||||||
Reference in New Issue
Block a user