Skip to content

About

A module that displays the current song on your spotify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Waybar-Spotify

A lightweight Waybar module that shows the song currently playing on Spotify as a smooth, scrolling text.

Preview

Features

  • Scrolling title - artist text while a track is playing
  • Static ⏸ title - artist display 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

Requirements

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)

Installation

  1. 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
  1. 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
  1. Add the module to your Waybar config (~/.config/waybar/config.jsonc):
   {
       "modules-center": ["custom/spotify"],
 
       "custom/spotify": {
           "exec": "$HOME/.config/waybar/scripts/waybar-spotify.sh",
           "format": "{}",
           "tooltip": false
       }
   }
  1. (Optional) Style it in ~/.config/waybar/style.css:
   #custom-spotify {
       padding: 0 10px;
       color: #1db954;
   }
  1. Restart Waybar:
   pkill waybar && waybar &

Customization

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

Troubleshooting

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 of waybar-spotify.sh, or use the absolute path to zscroll. The module is empty or shows faltando: <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).

Contributing

Issues and pull requests are welcome. If you found a bug or have an idea, feel free to open an issue.

License

Distributed under the MIT License. See LICENSE for details.

About

A module that displays the current song on your spotify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages