A daemon that fetches synced lyrics for the current track playing in any MPRIS-compatible media player. It exposes the lyrics via D-Bus so other programs can display them.
- Connects to any MPRIS-compatible player (Spotify, VLC, mpv, etc.)
- Fetches synced lyrics from LRCLIB
- Synchronizes lyrics with playback position
- Exposes the current lyric line via D-Bus
- sdbus-c++ (D-Bus C++ library)
- libcurl
- CMake 3.16+
- C++17 compiler
Install on Arch Linux:
sudo pacman -S sdbus-c++ curl cmake
Install on Ubuntu/Debian:
sudo apt install libsdbus-c++-dev libcurl4-openssl-dev cmake
cmake -B build
cmake --build build
The binary will be at build/lyricsd.
./build/lyricsd
Make sure a media player is running before starting lyricsd.
lyricsd exposes a D-Bus service that other programs can use.
| Property | Value |
|---|---|
| Service Name | org.lyricsd.Lyrics |
| Object Path | /org/lyricsd/Lyrics |
| Interface | org.lyricsd.Lyrics |
The current lyric line being displayed. Empty string when paused or no player is active.
You can read it directly:
gdbus call --session \
--dest org.lyricsd.Lyrics \
--object-path /org/lyricsd/Lyrics \
--method org.freedesktop.DBus.Properties.Get \
org.lyricsd.Lyrics CurrentLine
Emitted when the current lyric line changes. The argument is the new lyric text. Empty string means playback is paused or player was closed.
Example using dbus-monitor:
dbus-monitor --session "type='signal',sender='org.lyricsd.Lyrics'"
See the examples/waybar/ directory for a Waybar module that displays lyrics.
lyricsd listens to these MPRIS events from the player:
- Track changed: Fetches new lyrics and starts sync
- Seeked: Adjusts lyrics position to match
- Playback status: Pauses/resumes lyrics sync
- Player closed: Clears current lyrics
MIT