Created
January 24, 2026 21:06
-
-
Save Ziggoto/6a39fee2d7c0f4d6a6509e50d8168eb7 to your computer and use it in GitHub Desktop.
Spotify song in the terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ONLY TESTED ON UBUNTU 16.04 | |
| # REQUIRES SPOTIFY INSTALLED | |
| 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