A lightweight Waybar module that shows the song currently playing on Spotify as a smooth, scrolling text.
- Scrolling
title - artisttext while a track is playing - Static
⏸ title - artistdisplay when playback is paused - Single shell script, no daemon and no extra config files
- Easy to tweak: scroll speed and text width are plain command-line flags
| Dependency | Purpose |
|---|---|
| Waybar | Status bar |
| zscroll | Text scrolling |
| playerctl | Reads the Spotify player state |
| Spotify | Music player (any client that exposes MPRIS under the name spotify) |
- Clone the repository (or copy directly from /src/waybar-spotify.sh into a file):
git clone https://github.com/<your-user>/waybar-spotify.git
cd waybar-spotify- Copy the script to your Waybar scripts folder and make it executable:
mkdir -p ~/.config/waybar/scripts
cp src/waybar-spotify.sh ~/.config/waybar/scripts/
chmod +x ~/.config/waybar/scripts/waybar-spotify.sh- Add the module to your Waybar config (
~/.config/waybar/config.jsonc):
- (Optional) Style it in
~/.config/waybar/style.css:
#custom-spotify {
padding: 0 10px;
color: #1db954;
}- Restart Waybar:
pkill waybar && waybar &All options live in the zscroll call inside waybar-spotify.sh:
| Flag | Default | Description |
|---|---|---|
--length |
10 |
Number of characters visible at once |
--delay |
0.1 |
Seconds between scroll steps (lower is faster) |
--before-text |
⏸ |
Prefix shown while paused |
-p |
" " |
Separator displayed between loops of the text |
The script works in the terminal but not when Waybar is started by the compositor.
Waybar launched from your session (autostart, systemd, etc.) does not read your interactive shell configuration, so it may not find zscroll in its PATH. This is common when zscroll is installed with pip --user, pipx or conda/miniforge.
- Find where it is installed:
command -v zscroll - Add that directory to the
export PATH=...line at the top ofwaybar-spotify.sh, or use the absolute path tozscroll. The module is empty or showsfaltando: <command>.
A dependency is missing from the PATH. Check that both zscroll and playerctl are installed and reachable.
playerctl does not detect Spotify.
Run playerctl -l. If spotify is not listed, make sure Spotify is running and that Waybar has access to your D-Bus session (DBUS_SESSION_BUS_ADDRESS and XDG_RUNTIME_DIR must be set in its environment).
Issues and pull requests are welcome. If you found a bug or have an idea, feel free to open an issue.
Distributed under the MIT License. See LICENSE for details.

{ "modules-center": ["custom/spotify"], "custom/spotify": { "exec": "$HOME/.config/waybar/scripts/waybar-spotify.sh", "format": "{}", "tooltip": false } }