Skip to content

A simple program which grabs mpris.MediaPlayer2 metadata through dBus and scrolls it on a window

License

Notifications You must be signed in to change notification settings

diogofd8/dBusPlayerScroller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dBusPlayerScroller

A simple C++ program which grabs mpris.MediaPlayer2 metadata through dBus and scrolls it on a window, created with the intention of being run with polybar. There are similar projects from which I took inspiration from, namely jan146's playerctl-scroller and PrayagS's polybar-spotify, please check them out.

Installation

I did not create (yet) any installer for this. For now, simply clone this repository, compile it with g++ and run the binary file. It can be moved to whichever directory, such as ~/.config/polybar/scripts/.

git clone https://github.com/diogofd8/dBusPlayerScroller.git
cd dbusStringScroller
make -f makefile all
# Copy the binary to your preferred directory
mkdir -p ~/.config/polybar/scripts/
cp dbusStringScroller ~/.config/polybar/

Configuration (polybar)

It can be launched from any custom/script, such as:

[module/spotify]
type = custom/script
tail = true
format = <label>
exec = $HOME/.config/polybar/scripts/dbusStringScroller

Execution Parameters

While the default configuration (running the binary without extra arguments) is set to work with spotify, dBusPlayerScroller is meant to support any mpris.MediaPlayer2 compatible player. The configuration options are as follows:

dBusStringScroller [Options]
Options:
  -p | --player  [player name]
  -s | --speed   [scroll speed]
  -l | --length  [view length]
  -d | --debug

Scroll speed is in millisseconds, length corresponds to the dimensions (in character count) of the viewer window. I plan to add a metadata formatting option and a prefix/suffix option to format the output to any taste!

Dependencies

  • git gcc dbus

About

A simple program which grabs mpris.MediaPlayer2 metadata through dBus and scrolls it on a window

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published