Skip to content

Get current song info with global shortcut #1325

Answered by saintamh
alienator asked this question in Q&A
Discussion options

You must be logged in to vote

I use playerctl for that (on Ubuntu 22.04)

  • playerctl --player=strawberry metadata prints out all metadata for the current track
  • playerctl --player=strawberry metadata xesam:title specifically specifies the title

On Linux you could also try using notify-send to display the title as desktop notification, perhaps something like this:

notify-send "$(playerctl --player=strawberry metadata xesam:title)"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by alienator
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1322 on November 26, 2023 00:07.