waybar-lyric

command module
v0.18.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Waybar Lyric

A waybar module for song lyrics

[!IMPORTANT] 🔥 Found this useful? A quick star goes a long way.

Description

waybar-lyric fetches and displays real-time lyrics on your Waybar. It provides a scrolling lyrics display that syncs with your currently playing music, enhancing your desktop music experience. Checkout the Example waybar configuration.

Supported Players

waybar-lyric will work with any player that has xesam:album and xesam:artist metadata.

Run playerctl metadata -a to check if your player has those metadata.

I've test these following player:

Features

  • Real-time display of the current song's lyrics
  • Click to toggle play/pause
  • Smart caching system:
    • Stores available lyrics locally to reduce API requests
    • Remembers songs without lyrics to prevent unnecessary API calls
  • Custom waybar tooltip
  • Configurable maximum text length
  • Detailed logging options
  • Profanity filter
    • Partial (badword -> b*****d)
    • Full (badword -> *******)

Installation

Prerequisites

  • Any of the supported browser or player
  • DBus connectivity
  • waybar
  • go

Install

AUR
  • Latest stable version
yay -S waybar-lyric
  • The latest git commit:
yay -S waybar-lyric-git
Nixpkgs
  • NixOS:
environment.systemPackages = [
  pkgs.waybar-lyric
];
  • Home-Manager:
home.packages = [
  pkgs.waybar-lyric
];
  • On Non NixOS:
# without flakes:
nix-env -iA nixpkgs.waybar-lyric
Manual

You need GNU make and install

  1. Build the waybar-lyric
git clone https://github.com/Nadim147c/waybar-lyric.git
cd waybar-lyric
make
  1. Local install
make install PREFIX=$HOME/.local
  1. Global install
sudo make install PREFIX=/usr

Note: You have to make sure that $GOPATH/bin/ in your system PATH before running waybar.

go install github.com/Nadim147c/waybar-lyric@latest

Configuration

Waybar Configuration

The recommended way to configure waybar-lyric is to generate the configuration snippet using the built-in command:

waybar-lyric init

This will output the proper JSON configuration snippet that you can copy directly into your Waybar config.jsonc file.

Style Example

Add to your style.css:

#custom-lyrics {
  color: #1db954;
  margin: 0 5px;
  padding: 0 10px;
}

#custom-lyrics.paused {
  color: #aaaaaa; /* Set custom color when paused */
}

Troubleshooting

If you encounter issues:

  1. Check that any of the supported browser is running is running and connected
  2. Run with verbose logging
waybar-lyric -v --log-file=/tmp/waybar-lyric.log
  1. Verify DBus connectivity with:
dbus-send --print-reply \
    --dest=org.mpris.MediaPlayer2.<player> \
    /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get \
    string:org.mpris.MediaPlayer2.Player \
    string:PlaybackStatus

Hacking

Contributions are welcome! Feel free to submit a Pull Request.

License

This repository is licensed under AGPL-3.0.

Thanks To

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址