|
|
|
|
|
|
|
|
|
|
|
|
|
|
firefox_mpris_dbus=$(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -Po "org.mpris.*firefox[^\"]+") |
|
|
firefox_mpris_dbus=$(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -Po "org.mpris.*firefox[^\"]+") |
|
|
|
|
|
|
|
|
if [ -n $firefox_mpris_dbus ]; then |
|
|
|
|
|
|
|
|
if [ -n "${firefox_mpris_dbus}" ]; then |
|
|
playback_string=$(dbus-send --print-reply --dest=${firefox_mpris_dbus} /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' | grep -Po "(?<=string \")[^\"]+") |
|
|
playback_string=$(dbus-send --print-reply --dest=${firefox_mpris_dbus} /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' | grep -Po "(?<=string \")[^\"]+") |
|
|
|
|
|
|
|
|
echo "Firefox MPRIS Instance ${firefox_mpris_dbus} has playback status ${playback_string}" |
|
|
echo "Firefox MPRIS Instance ${firefox_mpris_dbus} has playback status ${playback_string}" |