Merge branch 'master' of https://github.com/dylanaraps/neofetch
This commit is contained in:
commit
b7e6c9931a
|
@ -106,8 +106,10 @@
|
|||
|
||||
**Song**<br \>
|
||||
|
||||
- Added support for Clementine. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for GNOME Music. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Lollypop. **[@konimex](https://github.com/konimex)**
|
||||
- Added support for Pragha. **[@konimex](https://github.com/konimex)**
|
||||
|
||||
**Public IP**<br \>
|
||||
|
||||
|
|
19
neofetch
19
neofetch
|
@ -1081,7 +1081,7 @@ get_memory() {
|
|||
|
||||
get_song() {
|
||||
# This is absurdly long.
|
||||
player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|gnome-music|lollypop/ {printf $5 " " $6; exit}')"
|
||||
player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|gnome-music|lollypop|clementine|pragha/ {printf $5 " " $6; exit}')"
|
||||
|
||||
case "${player/*\/}" in
|
||||
"mpd"*)
|
||||
|
@ -1187,6 +1187,23 @@ get_song() {
|
|||
song="${song% - }"
|
||||
;;
|
||||
|
||||
"clementine"*)
|
||||
# dbus
|
||||
song="$(
|
||||
dbus-send --print-reply --dest=org.mpris.clementine /org/mpris/MediaPlayer2 \
|
||||
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |\
|
||||
awk -F 'string "' '/string|array/ {printf "%s",$2; next}{print ""}' |\
|
||||
awk -F '"' '/artist|title/ {printf $2 " - "}'
|
||||
)"
|
||||
song="${song% - }"
|
||||
;;
|
||||
|
||||
"pragha"*)
|
||||
artist="$(pragha -c | awk -F':' '/artist/ {print $2}')"
|
||||
title="$(pragha -c | awk -F':' '/title/ {print $2}')"
|
||||
song="$artist - $title"
|
||||
;;
|
||||
|
||||
*) song="Not Playing" ;;
|
||||
esac
|
||||
|
||||
|
|
Reference in New Issue