aboutsummaryrefslogtreecommitdiff

mpris is a command-line tool for controlling MPRIS v2 capable media players on Linux (which is practically all of them, nowadays). It is very similar to playerctl, although predates it by two years and is written in slow and clumsy Perl.

Dependencies: Net::DBus

Demo:

$ mpris
quodlibet (Quod Libet) – Playing

$ mpris --help
Usage: mpris [{<player>|--all} <cmd> [args...]]
       mpris <player> {activate|is-running}
       mpris --list
       mpris --help {commands|get|set|printf}

$ mpris --all summary
-- quodlibet (Quod Libet) --
[Playing] Gorillaz – El Mañana (0:11/3:49)
  Art URL              : file:///tmp/tmpcrp88aiz
  Length               : 3:49
  Track ID             : /net/sacredchao/QuodLibet/140195105373808
  Album                : Demon Days
  Artist               : Gorillaz
  xesam:contentCreated : 2005-01-01T00:00:00
  Genre                : Alternative rock
  Last played          : 1970-01-01T00:00:00
  Title                : El Mañana
  Track number         : 7
  URL                  : file:///home/grawity/Music/archive/Gorillaz%20-%20El%20Ma%C3%B1ana.mp3
  Play count           : 0
  Rating (0..1)        : 0.5
(volume: 100%, repeat: none, shuffle: on)

Note: The Git history has many irrelevant-looking commits because it was extracted from the ~/code mega-repo, together with Lib.pm which received changes for various other projects co-located there.