hpr4033 :: Using playerctl to control media players
Ken maps some playerctl commands to keyboard shortcuts in lxqt
Hosted by Ken Fallon on 2024-01-17 is flagged as Clean and is released under a CC-BY-SA license.
playerctl, mpris, lxqt.
(Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr4033
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 00:05:51
Today I Learnt.
A series where hosts speak about recent discoveries they have made which they consider might be of interest to the HPR Community.
About MPRIS
The Media Player Remote Interfacing Specification is a standard D-Bus interface which aims to provide a common programmatic API for controlling media players.
It provides a mechanism for discovery, querying and basic playback control of compliant media players, as well as a tracklist interface which is used to add context to the active media item.
man playerctl
DESCRIPTION
The playerctl utility controls MPRIS-enabled media players. In addition to offering play, pause and stop control, playerctl also offers previous and next track support, the ability to seek backwards and forwards in a track, and volume control. playerctl also supports displaying metadata (e.g., artist, title, album) for the current track, and showing the status of the player.
Players that can be controlled using playerctl include audacious(1), cmus(1), mopidy(1), mpd(1), quodlibet(1), rhythmbox(1), vlc(1) and xmms2(1). However, any player that implements the MPRIS interface specification can be controlled using playerctl including web browsers.
Command Summary
- "playerctl status" Get the current status of the player.
- "playerctl play" Command the player to play.
- "playerctl pause" Command the player to pause.
- "playerctl play-pause" Command the player to toggle between play and pause.
- "playerctl stop" Command the player to stop.
- "playerctl next" Command the player to skip to the next track.
- "playerctl previous" Command the player to skip to the previous track.