clematis

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 13 Imported by: 0

README

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

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
	"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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL