You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Kilobyte22 92a7255790 Fix a bug showing … even when title was not too long 1 year ago
src Fix a bug showing … even when title was not too long 1 year ago
.gitignore Initial Commit 1 year ago
Cargo.lock Various improvements 1 year ago
Cargo.toml Various improvements 1 year ago
README.md Add README 1 year ago
config.example.toml Add option to specify maximum length of text in the block 1 year ago
polybar-mpris.service Various improvements 1 year ago

README.md

polybar-mpris

A program to centrally manage your media players on your computer, supporting multiple players

The name is kinda misleading, as this tool will work for more than just polybar and for more than just MPRIS players.

Features

  • Show current state of a selected player
  • Allow switching the selected player
  • MPRIS support (VLC, Amarok, Spotify etc)
  • MPD support
  • Retrieval of MPD credentials from pass

Usage

(Optional) Copy the provided default config file to ~/.config/polybar-mpris.toml and adjust to your liking

First start the daemon - this can be done using the provided systemd user unit or by running:

polybar-mpris daemon

Then add the block to your bar. An example config for polybar might look like this:

[module/mpris]
type = custom/script
exec = ~/.cargo/bin/polybar-mpris block
tail = true
click-left = ~/.cargo/bin/polybar-mpris player-next

you should now set up keybinds for the following subcommands:

  • toggle - Toggle play state of the selected player
  • next - Skip to next track for the selected player
  • prev - Skip to previous track for the selected player
  • player-next - Select next player
  • player-prev - Select previous player

If you want to use MPD add your server(s) to the config file. Available MPDs should be automatically discovered.