Lyricer is an addon for waybar to display lyrics.
-
Read media using
mpris
-
Fast and lightweight (<0.1% cpu usage, 1.9M after stripping)
-
Completely compatiable with waybar
Use cargo
to build and install it.
cargo install lyricer
or
cargo build --release
Add following lines to your waybar
configuration:
"modules-center": ["custom/lyrics"],
"custom/lyrics": {
"format": "♪ {}",
"interval": 1,
"exec": "/usr/bin/cat /tmp/lyrics",
"exec-if": "test -f /tmp/lyrics",
"return-type": "json"
}
And don't forget to start lyricer
in the background, preferrably with sway configutation.
Contrast to common implementation, lyricer
will stay idle whenever it can. This means that the lyrics will not change untill they "suppose" to change according to the lrc file. Thus, when user manually change the audio, lyricer
will not change untill the current lyrics line is finished.
Sometime the lyric will also lag regardless user interaction. The reason behind this is being investigated. PRs or helpful issues are welcome.
The following features are either planning or currently unable to archive:
-
Control media (pause, resume, next, previous) with buttons
-
Colorful output
-
More lyrics support (less error-prone)
-
Fix laggy performance
-
Manual selection of lyric file
Pull requests are welcome.