https://github.com/sammy-ette/clematis
Discord rich presence for MPRIS music players.
https://github.com/sammy-ette/clematis
discord-rich-presence mpris rich-presence
Last synced: 6 months ago
JSON representation
Discord rich presence for MPRIS music players.
- Host: GitHub
- URL: https://github.com/sammy-ette/clematis
- Owner: sammy-ette
- License: mit
- Created: 2021-10-26T19:07:55.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-05T20:45:43.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T13:38:10.627Z (6 months ago)
- Topics: discord-rich-presence, mpris, rich-presence
- Language: Go
- Homepage:
- Size: 289 KB
- Stars: 31
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Clematis
> Discord rich presence for MPRIS music players.Clematis provides a rich presence for [MPRIS-supported](#supported-clients) 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:
```sh
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:
```json5
{
"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](https://specifications.freedesktop.org/mpris-spec/)
will work. This includes:
- cmus
- Chrome/Chromium
- VLC
- ncspot
- [mpv](https://github.com/hoyon/mpv-mpris)
- [mpd](https://wiki.archlinux.org/title/Music_Player_Daemon/Tips_and_tricks#MPRIS_support)Some others are listed at the [Arch Linux wiki.](https://wiki.archlinux.org/title/MPRIS#Supported_clients)
# License
Clematis is licensed under the MIT license.
[Read here](LICENSE) for more.