Skip to content

Latest commit

 

History

History
79 lines (65 loc) · 2.49 KB

README.md

File metadata and controls

79 lines (65 loc) · 2.49 KB

Clematis

Discord rich presence for MPRIS music players.

Clematis provides a rich presence for MPRIS-supported music players. It will take information from the 1st music player and show it as a rich presence.

⚠️ Clematis is currently a work in progress! It can error out at some times.

Planned features

  • Custom client ID

Installation

go install github.com/TorchedSammy/clematis@latest

or by manually compiling:

git clone https://github.com/TorchedSammy/clematis
cd Clematis
go get -d
go build

Usage

Just run the clematis binary! Playing songs will automatically be made into the rich presence.

Configuration

Clematis can be configured using a JSON file. On Linux, the path is ~/.config/Clematis/config.json. ~/.config can be changed to any dir with the $XDG_CONFIG_HOME env variable.

It does not create a default config file, but for reference these are the configurable fields:

{
	"vars": [""], // define a list of vars for the presence from the metadata (reference from `playerctl metadata`)
	"blacklist": [""], // list of blacklisted clients
	"whitelist": [""], // list of whitelisted clients (ignored if empty)
	"useIdentifiers": false, // use mpris player identifiers (as listed by `playerctl -l`) instead of names
	"logLevel": "info", // level for log (accepts info, debug and error)
	"presence": {
		"details": "{title}" // the top text in the presence
		"state": "{artist} {album}", // the bottom text in the presence
	},
	"playerPresence": {
		// define unique presence data per player
		// name used is what shows up on clematis startup
		"cmus": {
			// the fields here are the same as `presence`
		}
	}
}

The already provided metadata vars are:

  • title - Name of the track
  • artist - Name of artist(s), joined by comma and prefixed with by
  • album - Name of album, prefixed with on Vars can be used in the presence fields when they are surrounded by {}, like {artist}

Supported Clients

Any music player that supports MPRIS will work. This includes:

  • cmus
  • Chrome/Chromium
  • VLC
  • ncspot
  • mpv
  • mpd

Some others are listed at the Arch Linux wiki.

License

Clematis is licensed under the MIT license.
Read here for more.