Discord rich presence for MPRIS music players.

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 rich presence fields
  • Blacklist certain players

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.

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.

Owner
sammyette
i write software, mostly in go and lua • art enthusiast and anthophile • kpop and anime lover
sammyette
Similar Resources

Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022

Bot used for https://discord.gg/rflutterdev

FlutterDoc A bot offering exactly what we need in The r/FlutterDev Discord Server that Dyno can't offer us. Quick search patterns that can be embedded

Dec 8, 2022

Harmony is a peaceful Go module for interacting with Discord's API

Harmony Harmony is a peaceful Go module for interacting with Discord's API. Although this package is usable, it still is under active development so p

Sep 18, 2022

An easy-to-use discord bot written in go

Discord Bot An easy-to-use discord bot template written in golang using discordgo. This template was written for learning golang. It will be updated a

Jan 23, 2022

discord exploit tools written in golang

The ultimate CLI tool for TiKV

Aug 19, 2021

An extension for discordgo to create a Discord bot quickly using the Builder pattern.

botbuilder An extension for discordgo to create a Discord bot quickly using the Builder pattern. Example usage: package main import ( "log" "os"

Oct 12, 2022

Formats discord tokens to different formats.

Formats discord tokens to different formats.

token_formatter Formats discord tokens to different formats. Features Format your current tokens to a new format! Every tool uses a different format f

Nov 3, 2022

Bot para o discord escrito em Golang durante o workshop ministrado na Codecon 2021

Codecon Bot Bot para o discord escrito em Golang durante o workshop ministrado na Codecon 2021 Primeiramente no arquivo main.go coloque o TOKEN do bot

Oct 4, 2021

A discord bot that watches for tiktok URL's and automatically uploads the corresponding video to the channel

TikiTok Bot A Discord bot that watches for TikTok URLs and sends a message to the channel with the corresponding video attached Click to invite the bo

Jul 28, 2022
Comments
  • feat: add whitelisting

    feat: add whitelisting

    Hey!

    Thanks for making this program! I can finally show off my music after ditching spotify :)

    I think some people (me included) would prefer to only show status from specific players, so I decided to add a whitelist feature.

    I'm not sure if you prefer this or not, but I think the white and blacklists should use the identifier playerctl -l shows, instead of the display name, so i changed that too.

    I've also removed the playerName variable (seems unused?), as well as the unneeded conditional and unreachable return.

  • clematis panics if Metadata doesn't have xesam:url

    clematis panics if Metadata doesn't have xesam:url

    trying to run Clematis gives me

    Getting information from "cmus"
    panic: interface conversion: interface {} is nil, not string
    
    goroutine 1 [running]:
    main.setPresence(0xc057de56821c1643, {0xc057de56821c1643, 0xfffffffc8a0095e5, 0x6788a0})
    	/home/jelly/Clematis/main.go:114 +0x4d4
    main.main()
    	/home/jelly/Clematis/main.go:69 +0x8c5
    

    looking at the line that panics out, it seems that cmus doesn't want to expose any of my files' xesam:url.

    entering dbus-send --print-reply --dest=org.mpris.MediaPlayer2.cmus /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' into my shell gives me, for example,

    method return time=1635713510.349210 sender=:1.47 -> destination=:1.90 serial=67 reply_serial=2
       variant       array [
             dict entry(
                string "mpris:trackid"
                variant                object path "/31"
             )
             dict entry(
                string "mpris:length"
                variant                int64 238000000
             )
             dict entry(
                string "xesam:artist"
                variant                array [
                      string "aespa"
                   ]
             )
             dict entry(
                string "xesam:title"
                variant                string "Savage"
             )
             dict entry(
                string "xesam:album"
                variant                string "Savage - The 1st Mini Album"
             )
             dict entry(
                string "xesam:albumArtist"
                variant                array [
                      string "aespa"
                   ]
             )
             dict entry(
                string "xesam:genre"
                variant                array [
                      string "댄스/팝"
                   ]
             )
             dict entry(
                string "xesam:comment"
                variant                array [
                      string "32349594"
                   ]
             )
             dict entry(
                string "xesam:trackNumber"
                variant                int32 2
             )
             dict entry(
                string "xesam:discNumber"
                variant                int32 1
             )
          ]
    

    ~~i think i might have a fix but i feel like it's a bandaid fix and it might suck ^^;~~

  • panic: interface conversion: interface {} is nil, not int64

    panic: interface conversion: interface {} is nil, not int64

    %: ./Clematis
    Getting information from Mozilla Firefox
    panic: interface conversion: interface {} is nil, not int64
    
    goroutine 1 [running]:
    main.setPresence(0xc065a28c29b7a0b9, {0xc065a28c29b7a0b9, 0x38e123b6e, 0x676840}, 0xc000123f08)
    	/home/user/go/pkg/mod/github.com/!torched!sammy/[email protected]/main.go:130 +0x585
    main.main()
    	/home/user/go/pkg/mod/github.com/!torched!sammy/[email protected]/main.go:68 +0x4e6
    
  • feat: config

    feat: config

    custom config!! this would allow multiple things to be configured like:

    • [ ] #4
    • [x] blacklist - array of player names to not take info from
    • [x] presence - table of presence info to change
      • [x] state and details
      • [x] showTime - whether to show time elapsed/remaining
      • [ ] timeInfo - would be elapsed or remaining
discord bot that plays music in a voice channel discord

Music discord bot by serje3 Description A bot written in the Golang language plays music on your server's voice channel on Discord. It can be built an

Nov 17, 2021
A Discord bot for managing ephemeral roles based upon voice channel member presence.
A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles A Discord bot for managing ephemeral roles based upon voice channel member presence. Quickstart Click on the Ephemeral Roles logo head

Dec 19, 2022
Discordo is a lightweight, secure, and feature-rich Discord terminal client.
Discordo is a lightweight, secure, and feature-rich Discord terminal client.

discordo · [WIP] Discordo is a lightweight, secure, and feature-rich Discord terminal client. It is highly configurable and has a minimalistic user in

Jan 5, 2023
A simple Discord bot developed for the Bedrock Gophers discord server.

Bedrock Gopher A simple Discord bot developed for the Bedrock Gophers discord server. Click here to invite the bot to your guild. You will also need t

Mar 12, 2022
Discord-dl: a tool to archive discord channels

discord-dl discord-dl is a tool to archive discord channels. I think it's safe t

May 18, 2022
Discord-notif - Send notifications to discord in Your pipelines or scripts
Discord-notif - Send notifications to discord in Your pipelines or scripts

discord-notif Send notifications to discord in Your pipelines or scripts install

Dec 15, 2022
Discord-finder - The back-end for retrieving information about people on discord
Discord-finder - The back-end for retrieving information about people on discord

About This is the backend application for Discord Finder, it allows you to retrive information about people on discord just like the discord lookup we

Jan 4, 2022
Discord-bot - A Discord bot with golang

JS discord bots Install Clone repo git clone https://github.com/fu-js/discord-bo

Aug 2, 2022
Wipe-discord - TUI application to erase Discord messages
Wipe-discord - TUI application to erase Discord messages

wipe-discord Terminal user interface (TUI) application to delete Discord message

Aug 21, 2022
Music recognition bot for Reddit powered by audd.io. Note that the code currently needs some cleaning up and doesn't follow the best practices.

Music recognition bot for Reddit u/auddbot identifies music on Reddit. When someone mentions it or writes a question like "what's the song", it sends

Dec 30, 2022