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.
- Custom client ID
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
Just run the clematis
binary! Playing songs will automatically be made into the rich
presence.
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 trackartist
- Name of artist(s), joined by comma and prefixed withby
album
- Name of album, prefixed withon
Vars can be used in the presence fields when they are surrounded by{}
, like{artist}
Any music player that supports MPRIS will work. This includes:
Some others are listed at the Arch Linux wiki.
Clematis is licensed under the MIT license.
Read here for more.