-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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 -landspotpris2 -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