A scrolling MPRIS module for Waybar written in Rust.
Note: This project was generated and improved with the help of AI.
- DBus: Required for inter-process communication.
- playerctl: Ensure this daemon is running for MPRIS control.
- Cargo: Rust's package manager and build tool (Learn more).
The program is now on Arch User Repository. You can an AUR helper like yay to install it.
yay -S scrollmpris-git-
Clone the Repository:
git clone https://github.com/BEST8OY/ScrollMPRIS.git cd ScrollMPRIS -
Build the Project:
cargo build --release
-
Locate the Executable: After a successful build, the binary will be in:
target/release/
-
Install Install the binary to
/usr/local/bininstall -Dt /usr/local/bin target/release/ScrollMPRIS
To add ScrollMPRIS as a custom module in Waybar, insert the following snippet into your Waybar config:
"custom/ScrollMPRIS": {
"return-type": "json",
"exec": "ScrollMPRIS",
"escape": true,
"on-click": "playerctl play-pause"
},Replace /path/to/ScrollMPRIS with the actual path to your built binary.
You can customize the module's appearance using these selectors in your Waybar style:
#custom-ScrollMPRIS,
#custom-ScrollMPRIS.playing,
#custom-ScrollMPRIS.paused,ScrollMPRIS offers several command-line options to tailor its behavior:
| Option | Description | Example |
|---|---|---|
-s, --speed <0-100> |
Scroll speed (0: slow=1000ms, 100: fast=100ms) | -s 50 |
-w, --width <number> |
Maximum width for the scrolling text | -w 40 |
-b, --blocked <list> |
Block certain players (comma-separated, case-insensitive) | -b edge,firefox,mpv |
-p, --position |
Enable position display (show track time info) | -p or --position |
--scroll <wrapping OR reset> |
Choose scrolling behavior: wrapping for continuous loop, reset to restart after finish |
--scroll wrapping |
--position-mode <mode> |
Position style: increasing (elapsed) or remaining (time left) |
--position-mode remaining |
--format <string> |
Metadata format (supports {title}, {artist}, {album}) |
--format '{title} - {artist}' |
--tooltip-format <string> |
Metadata format for tooltip (supports {title}, {artist}, {album}) |
--tooltip-format '{title} - {artist}' |
--icon-format <string> |
Icon format as JSON. 404 means default | --icon-format '{"404": "", "vlc": "", "mpv": "", "spotify": ""}' |
--no-icon |
Disable icon in output | --no-icon |
--no-status-icon |
Disables play/pause icon in output | --no-status-icon |
--freeze |
Pause scroll when playback is paused | --freeze |
Examples:
ScrollMPRIS -s 50 -w 40 -b edge,firefox,mpv --scroll wrapping --position --position-mode remaining --format '{title} - {artist}' --no-icon- To enable position display, simply add
-por--position(no value needed). - To disable, omit the flag.
Reset mode:
Wrapped mode:
pid is stored in a file at /tmp/scrollbarmpris/{timestamp}.pid. Use it to track instances
Contributions, feature requests, and issue reports are always welcome! Feel free to open an issue or submit a pull request.
- ScrollMPRIS and this README were written and improved using AI.
Unlicensed. See LICENSE for details.

