Merge pull request #173 from iandrewt/google-play-music
Added Google Play Music Desktop Player as a song output source
This commit is contained in:
commit
3e2c4c3b53
|
@ -84,6 +84,7 @@ your distro's logo or any ascii art of your choice!
|
||||||
|
|
||||||
- Displaying images: `w3m-img` \[2\] \[3\] or `iTerm2` \[4\]
|
- Displaying images: `w3m-img` \[2\] \[3\] or `iTerm2` \[4\]
|
||||||
- Thumbnail creation: `imagemagick`
|
- Thumbnail creation: `imagemagick`
|
||||||
|
- Displaying song information from Google Play Music Desktop Player: [`gpmdp`](https://github.com/iAndrewT/gpmdp-bash)
|
||||||
|
|
||||||
##### Linux / BSD
|
##### Linux / BSD
|
||||||
|
|
||||||
|
|
4
neofetch
4
neofetch
|
@ -1228,6 +1228,10 @@ getsong () {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /Google Play Music Desktop Player/')" ] && type -p gpmdp >/dev/null 2>&1; then
|
||||||
|
song="$(gpmdp current)"
|
||||||
|
state="$(gpmdp status)"
|
||||||
|
|
||||||
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then
|
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then
|
||||||
song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " name of current track as string')"
|
song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " name of current track as string')"
|
||||||
state="$(osascript -e 'tell application "iTunes" to player state as string')"
|
state="$(osascript -e 'tell application "iTunes" to player state as string')"
|
||||||
|
|
Reference in New Issue