4 stable releases
1.0.3 | Nov 15, 2020 |
---|---|
1.0.2 | Nov 11, 2020 |
#8 in #waybar
22KB
318 lines
Lyricer
Lyricer is an addon for waybar to display lyrics.
Features
-
Read media using
mpris
-
Fast and lightweight (<0.1% cpu usage, 1.9M after stripping)
-
Completely compatiable with waybar
Installation
Use cargo
to build and install it.
cargo install lyricer
or
cargo build --release
Usage
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.
Why it's too laggy?
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.
TODOs
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
Contributing
Pull requests are welcome.
License
Dependencies
~10–18MB
~267K SLoC