Skip to content

About

🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Playerctl

CI Docs codecov Latest tag License: LGPL v3 Tests

meson uv

glib >=2.38 MPRIS v2

Playerctl is a command-line utility and library for controlling media players that implement the MPRIS D-Bus Interface Specification. Playerctl makes it easy to bind player actions, such as play and pause, to media keys. You can also get metadata about the playing track such as the artist and title for integration into statusline generators or other command-line tools.

Playerctl also comes with a daemon that allows it to act on the currently active media player called playerctld.

Quick start

# Toggle play/pause on the first player found
playerctl play-pause

# Print "artist - title" of the current track
playerctl metadata --format '{{ artist }} - {{ title }}'

Documentation

  • Installing - packages and building from source
  • Usage - commands, selecting players, formatting, following changes
  • Troubleshooting - debug logging, missing players, playerctld autostart
  • Using the library - GObject introspection bindings and example scripts
  • API reference - generated from the C sources
  • Changelog - what changed in each release
  • Releasing - release candidates and releases from the GitHub UI

Resources

Check out the following articles about Playerctl:

Alternatives

Other command-line MPRIS controllers:

Project Description Language Created Last commit
go-playerctl Reimplementation of playerctl language created last commit
mctl Controls both MPD and MPRIS players (archived) language created last commit
mpris-control Small application to control MPRIS2 players language created last commit
mpris-ctl Minimal tool for keyboard-driven window managers, depends only on libdbus language created last commit
mprisctl (RangHo) Media key bindings and status bar info, e.g. Polybar language created last commit
mprisctl (amedoeyes) Player switching, playback, volume, track list and metadata language created last commit

Test coverage

Test history Coverage grid

Disclaimer

They would call this fork LLM-slop - they would be right. LLM code varies from shit to mediocre and this repo would be mediocre at best.

Playerctl is one of the pillars in Linux desktop setups, but now it's abandoned for years.

I'm forking it to keep it working and maintained. I use LLMs to help with development.

But LLM usage here has standards:

  • Specification compliance: Follow existing specs and established standards first.
  • Portability and maintainability: Keep the code consistent, simple, and maintainable.
  • KISS and DRY apply. Every change must serve a purpose.

A maintained project that follows its specifications is better than an abandoned one.

If you hate LLMs so much that my fork would make you your own fork with no llm-code and maintain it, i would be extremely happy about it and tribute your right here.

License

This work is available under the GNU Lesser General Public License (See LICENSE.md).

Copyright © 2014, Tony Crisci and contributors

Copyright © 2026, 5mdt fork contributors

About

🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages