added support for Google Play Music Desktop Player
also adds an optional dependancy of `gpmdp-bash`
This commit is contained in:
parent
461da47497
commit
1d04de9c1d
2 changed files with 9 additions and 2 deletions
|
@ -84,13 +84,14 @@ your distro's logo or any ascii art of your choice!
|
|||
|
||||
- Displaying images: `w3m-img` \[2\] \[3\] or `iTerm2` \[4\]
|
||||
- Thumbnail creation: `imagemagick`
|
||||
- Displaying song information from Google Play Music Desktop Player: `gpmdp` \[5\]
|
||||
|
||||
##### Linux / BSD
|
||||
|
||||
- Wallpaper: `feh`, `nitrogen` or `gsettings`
|
||||
- Current Song: `mpc` or `cmus`
|
||||
- Resolution: `xorg-xdpyinfo`
|
||||
- Screenshot: `scrot` \[5\]
|
||||
- Screenshot: `scrot` \[6\]
|
||||
|
||||
|
||||
\[1\] See **[#79](https://github.com/dylanaraps/neofetch/issues/79)** about why this is now a required dependency.
|
||||
|
@ -103,7 +104,9 @@ terminal emulators that don't support the xterm escape sequences we're using for
|
|||
\[4\] You can enable the `iTerm2` image backend by using the launch flag `--image_backend iterm2` or by<br \>
|
||||
changing the config option `$image_backend` to `iterm2`.
|
||||
|
||||
\[5\] You can use the launch flag `--scrot_cmd` or change the config option `$scrot_cmd` to your screenshot<br \>
|
||||
\[5\] This currently isn't in any repositories, see [`gpmdp-bash`](https://github.com/iandrewt/gpmdp-bash) for install instructions
|
||||
|
||||
\[6\] You can use the launch flag `--scrot_cmd` or change the config option `$scrot_cmd` to your screenshot<br \>
|
||||
program's cmd and neofetch will use it instead of scrot.
|
||||
|
||||
|
||||
|
|
4
neofetch
4
neofetch
|
@ -1228,6 +1228,10 @@ getsong () {
|
|||
;;
|
||||
esac
|
||||
|
||||
elif ([ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /Google Play Music Desktop Player/')" ] && [ -n "$(which gpmdp)" ]); then
|
||||
song="$(gpmdp artist) - $(gpmdp title)"
|
||||
state="$(gpmdp status)"
|
||||
|
||||
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')"
|
||||
state="$(osascript -e 'tell application "iTunes" to player state as string')"
|
||||
|
|
Loading…
Reference in a new issue