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.
# Toggle play/pause on the first player found
playerctl play-pause
# Print "artist - title" of the current track
playerctl metadata --format '{{ artist }} - {{ title }}'- Installing - packages and building from source
- Usage - commands, selecting players, formatting, following changes
- Troubleshooting - debug logging, missing players,
playerctldautostart - 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
Check out the following articles about Playerctl:
Other command-line MPRIS controllers:
| Project | Description | Language | Created | Last commit |
|---|---|---|---|---|
| go-playerctl | Reimplementation of playerctl | |||
| mctl | Controls both MPD and MPRIS players (archived) | |||
| mpris-control | Small application to control MPRIS2 players | |||
| mpris-ctl | Minimal tool for keyboard-driven window managers, depends only on libdbus | |||
| mprisctl (RangHo) | Media key bindings and status bar info, e.g. Polybar | |||
| mprisctl (amedoeyes) | Player switching, playback, volume, track list and metadata |
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.
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
