Skip to content

Instantly share code, notes, and snippets.

@Ziggoto
Created February 22, 2017 19:47
Show Gist options
  • Save Ziggoto/144840a3673e81c51b9fae4b7815b853 to your computer and use it in GitHub Desktop.
Save Ziggoto/144840a3673e81c51b9fae4b7815b853 to your computer and use it in GitHub Desktop.
Command line to show what I'm listening on Spotify
spot_song=$(qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata); echo $(echo $spot_song | sed -ne 's/xesam:artist: \(.*\)$/\1/p') "-" $(echo $spot_song | sed -ne 's/xesam:title: \(.*\)$/\1/p')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment