A terminal-based lyrics display tool for MPD that syncs and scrolls lyrics in real-time. Supports embedded lyrics in audio files and external LRC files.
-
MPD Server Connection
- Real-time connection to MPD server
- Automatic playback state synchronization
-
Lyrics Support
- Auto-loading LRC format lyrics files
- Extracting embedded lyrics from audio metadata
- Dual-mode intelligent lyrics matching
-
Playback Experience
- Real-time scrolling lyrics display
- Current line highlighting
- Smooth scrolling effect
-
Customization
- Configurable MPD connection parameters
- Custom lyrics directory path
- Adjustable interface colors and styles
-
Terminal Interface
- Clean and elegant design
- Low resource consumption
- Responsive performance
-
Prerequisites
Ensure you have Rust installed (recommended to use the official installation guide) -
Direct Installation
Run the following command to install the latest stable version from crates.io:cargo install lyra-rs
-
Clone Repository
git clone https://github.com/WayneKent/lyra.git cd lyra -
Build and Install
Execute the following command to install:cargo install .
Default configuration will be generated on first run. Configuration file path:
~/.config/lyra/config.toml
[mpd]
host = "127.0.0.1" # MPD server address
port = 6600 # MPD server port
password = "" # MPD authentication password (leave empty if no password)
[paths]
music_dir = "~/Music" # Music files directory
lyrics_dir = "~/Music" # Lyrics files directory (defaults to same as music directory)
[lyric_style]
color = "#AAAAAA" # Normal lyrics color
bold = false # Whether to bold normal lyrics
[lyric_style.current]
color = "#00FF7F" # Currently playing lyric color
bold = true # Whether to bold currently playing lyric- Ensure MPD service is running and playing music
- Run in terminal:
lyra-rs
- Key Controls:
q- Quit application
Lyra searches for lyrics in following priority:
- Matching
.lrcfiles in configuredlyrics_dir
- Filename must match song title
- Supports UTF-8 encoding
- Embedded lyrics in audio file metadata
- Supports common formats (MP3, FLAC, etc.)
- ratatui - Terminal UI library
- rust-mpd - MPD client implementation
- crossterm - Cross-platform terminal handling
- lofty - Audio metadata parsing
This project is licensed under the MIT License
