Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation for first-time use #6

Open
jbriales opened this issue May 27, 2020 · 2 comments
Open

Better documentation for first-time use #6

jbriales opened this issue May 27, 2020 · 2 comments

Comments

@jbriales
Copy link

Awesome tool! Thanks so much, unlocked me from controlling Spotify volume via i3 shortcuts.

I feel the README doesn't provide much hints into how to leverage this MPRIS interface though.

These are the quick notes I wrote for myself:

  • spotpris2 -l and spotpris2 -l id:
    show available devices and their IDs
    E.g. 79150f27eb368b66940ed4b6e765b673d29f58bc

  • spotpris2: Start MPRIS DBus
    After this, you can search for 'spotpris' in 'd-feet' -> 'Session Bus' list
    and get the Name for a device,
    e.g. 'org.mpris.MediaPlayer2.spotpris.device79150f27eb368b66940ed4b6e765b673d29f58bc'

  • Check current volume value:
    dbus-send --print-reply --type=method_call --dest=org.mpris.MediaPlayer2.spotpris.device79150f27eb368b66940ed4b6e765b673d29f58bc /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Volume

  • Set volume:
    dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotpris.device79150f27eb368b66940ed4b6e765b673d29f58bc /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Set string:org.mpris.MediaPlayer2.Player string:Volume variant:double:0.5

@freundTech
Copy link
Owner

The command line options including -l are already documented in the README.

The rest is not specific to spotpris, but all mpris devices, which is why I didn't document them here. dbus-send is only one option to interact with mpris devices. I personally would recommend playerctl as an mpris client, as it's syntax is way easier than constructing the dbus calls yourself.

@jbriales
Copy link
Author

Maybe adding some relevant links to get started with these? Or even just your comment above, would be useful for newcomers and I don't think most people who can benefit from this SpotPRIS2 wrapper will be experts on dbus-send or playerctl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants