| Crates.io | mprisence |
| lib.rs | mprisence |
| version | 1.2.4 |
| created_at | 2025-08-11 14:01:01.281838+00 |
| updated_at | 2025-08-11 17:17:20.86632+00 |
| description | A powerful Discord Rich Presence for MPRIS media players |
| homepage | https://github.com/lazykern/mprisence |
| repository | https://github.com/lazykern/mprisence |
| max_upload_size | |
| id | 1790217 |
| size | 274,395 |
A highly customizable Discord Rich Presence client for MPRIS media players. Supports VLC, MPV, RhythmBox, and many other Linux music and media players.

(Note: Actual appearance depends on your configuration and the specific media player)
Ready to use with popular media players (configured in config.default.toml):
Feel free to create a new issue if you want your player name+icon to be recognized by mprisence!
| Universal Media Player Support | Works with any MPRIS-compatible Linux media player. |
| Advanced Templating | Utilize the power of Handlebars templates for complete control over your presence text, including conditionals and helpers. |
| Online/Local Cover Arts | Automatically finds and displays the right album or video art. It can grab it from the web or use your own local files. |
| Live Configuration (Hot Reload) | Change your config.toml and see the updates reflected instantly without restarting the service. |
| Content-Aware Activity | Automatically sets your Discord status to "Listening", "Watching", etc., based on the media type (configurable). |
| Player-Specific Settings | Customize Discord App IDs, icons, and behavior for individual players. |
| Detailed Metadata | Access a rich set of metadata (including technical audio details) within your templates. |
systemd (user instance).rustc and cargo (latest stable version recommended)git (to clone the repository)# Install the stable version
yay -S mprisence
# Or, install the latest development version
yay -S mprisence-git
Download the .deb package from the GitHub Releases page and install it:
sudo dpkg -i /path/to/mprisence_*.deb
This method is for other Linux distributions, or if you prefer to install from source or crates.io. It requires a few manual setup steps.
mprisence binaryChoose one of the following ways to get the executable:
cargo install mprisence
This will install the binary to ~/.cargo/bin/. Ensure this directory is in your $PATH.
Download the ...-unknown-linux-gnu.tar.gz archive from the GitHub Releases page. Extract it, and place the mprisence binary in a directory included in your system's $PATH (e.g., ~/.local/bin or /usr/local/bin).
# Clone the repository
git clone https://github.com/lazykern/mprisence.git
cd mprisence
# Install from local source
cargo install --path .
This also installs the binary to ~/.cargo/bin/.
mprisence looks for its configuration at ~/.config/mprisence/config.toml.
Create the configuration directory:
mkdir -p ~/.config/mprisence
Download the example configuration:
curl -o ~/.config/mprisence/config.toml https://raw.githubusercontent.com/lazykern/mprisence/main/config/config.example.toml
Now you can edit this file to customize mprisence. See the Configuration Reference section for more details.
To have mprisence start automatically on login, set up the systemd user service.
Create the systemd user directory if it doesn't exist:
mkdir -p ~/.config/systemd/user
Download the service file:
The provided service file is configured to find the mprisence binary in ~/.cargo/bin/.
curl -o ~/.config/systemd/user/mprisence.service https://raw.githubusercontent.com/lazykern/mprisence/main/mprisence.service
Note: If you placed the binary in a different location (e.g.,
/usr/local/bin), you must edit~/.config/systemd/user/mprisence.serviceand change theExecStartpath.
Enable and start the service:
systemctl --user enable --now mprisence
This command enables mprisence to start at login and starts it immediately.
Once the service is installed (either manually or via a package), you can manage it using systemctl --user:
# Check service status
systemctl --user status mprisence
# Restart the service after changing the config
systemctl --user restart mprisence
# View detailed logs
journalctl --user -u mprisence -f
# Stop and disable the service
systemctl --user disable --now mprisence
mprisence is highly configurable via ~/.config/mprisence/config.toml (or $XDG_CONFIG_HOME/mprisence/config.toml).
After following the installation steps, you can modify ~/.config/mprisence/config.toml to your liking. The application will hot-reload most configuration changes automatically.
mprisence uses Imgbb as image hosting provider to host your local album covers, you need to get an ImgBB API key (get one at: https://api.imgbb.com/ after you logged in) and update the config as below
# [cover.provider]
# provider = ["imgbb", "musicbrainz"] # this will prioritize imgbb (originally ["musicbrainz", "imgbb"])
# or just set it to ["imgbb"] so it will only use local cover art only
[cover.provider.imgbb]
api_key = "YOUR_API_KEY_HERE"
Notes:
rm -rf ~/.cache/mprisence/cover_art.config.example.toml: Detailed options and explanations.config.default.toml: Default configurations for popular players.src/metadata.rs: Definitive source for all available template variables.# Basic settings
# Whether to clear Discord activity when media is paused
clear_on_pause = true
# How often to update Discord presence (in milliseconds)
interval = 2000
# Note: Triple braces `{{{variable}}}` are used to prevent HTML escaping,
# which is generally desired for Discord presence fields.
# See: https://handlebarsjs.com/guide/#html-escaping
# Display template
[template]
# First line in Discord presence
detail = "{{{title}}}"
# Second line in Discord presence - using Handlebars array iteration
state = "{{#each artists}}{{this}}{{#unless @last}} & {{/unless}}{{/each}}"
# or just use
# state = "{{{artist_display}}}"
# Text shown when hovering over the large image - using conditional helpers
large_text = "{{#if album}}{{{album}}}{{#if year}} ({{{year}}}){{/if}}{{#if album_artist_display}} by {{{album_artist_display}}}{{/if}}{{/if}}"
# Text shown when hovering over the small image (player icon)
# Only visible when show_icon = true in player settings
small_text = "{{#if player}}Playing on {{{player}}}{{else}}MPRIS{{/if}}"
# Activity type settings
[activity_type]
# Auto-detect type (audio -> "listening", video -> "watching")
use_content_type = true
# Default type: "listening", "watching", "playing", or "competing"
default = "listening"
# Time display settings
[time]
# Show progress bar/time in Discord
show = true
# true = show elapsed time, false = show remaining time
as_elapsed = true
[cover]
# File names (without extension) to search for local art (e.g., cover.jpg, folder.png)
file_names = ["cover", "folder", "front", "album", "art"]
# How many parent directories to search upwards for local art (0 = same dir only)
local_search_depth = 2
[cover.provider]
# Cover art providers in order of preference
# (imgbb will be used as a fallback if musicbrainz fails or local art isn't found)
provider = ["musicbrainz", "imgbb"] # Also checks local files first based on above
[cover.provider.musicbrainz]
# Minimum score (0-100) for MusicBrainz matches. Higher = stricter.
min_score = 95
[cover.provider.imgbb]
# Your ImgBB API key (get one at: https://api.imgbb.com/)
api_key = "YOUR_API_KEY_HERE"
# How long to keep uploaded images (in seconds, default: 1 day)
expiration = 86400
# Use 'mprisence players list' to get the correct player identity (e.g., vlc_media_player)
# Default settings applied to ALL players unless overridden below
[player.default]
ignore = false # Set to true to disable presence for all players by default
app_id = "1121632048155742288" # Default Discord Application ID
icon = "https://raw.githubusercontent.com/lazykern/mprisence/main/assets/icon.png" # Default icon URL
show_icon = false # Show player icon as small image by default?
allow_streaming = false # Allow web/streaming content by default?
# Override settings for a specific player (VLC in this example)
[player.vlc_media_player]
# You can override any key from [player.default] here
app_id = "YOUR_VLC_APP_ID_HERE" # Use a VLC-specific Discord App ID
icon = "https://example.com/vlc-icon.png" # Use a VLC-specific icon
show_icon = true # Show the VLC icon
allow_streaming = true # Allow streaming content for VLC
# You could also add 'override_activity_type = "watching"' here if desired
# Example: Ignore Spotify
# [player.spotify]
# ignore = true
# Get help
mprisence --help
# Run without system service
mprisence
# List available MPRIS players
mprisence players list
# Show detailed player information including metadata and config
mprisence players list --detailed
# Show current configuration
mprisence config
# Show version
mprisence version
# Enable more verbose logging
RUST_LOG=debug mprisence # or RUST_LOG=trace mprisence
Discord Presence Not Showing / Updating
mprisence players list to see detectable players.systemctl --user status mprisenceDiscord Settings -> Registered Games / Activity Privacy. Ensure Display current activity as a status message. is ON. Sometimes toggling this off and on helps. Add mprisence if it's not listed.app_id in your config matches a valid Discord application ID.journalctl --user -u mprisence -f or run RUST_LOG=debug mprisence for errors.Cover Art Not Displaying
RUST_LOG=debug mprisence to see the cover art process.min_score in your config.file_names in the folder/parent folders)? ImgBB is primarily used to upload local art.api_key in [cover.provider.imgbb] correct and valid?rm -rf ~/.cache/mprisence/cover_art) if you suspect stale entries.Service Issues
status), view logs (journalctl), and manage the service (start, stop, restart).Configuration Issues
_Syntax Errors: Validate your config.toml using an online TOML validator or toml-lint.
_ Defaults: If unsure, temporarily remove your ~/.config/mprisence/config.toml to test with the built-in defaults.
Contributions are welcome! Please feel free to open an issue to report bugs, suggest features, or discuss changes. If you'd like to contribute code, please open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.