diff --git a/doc/yambar-modules-mpris.5.scd b/doc/yambar-modules-mpris.5.scd index bfc6df9..2a3ae74 100644 --- a/doc/yambar-modules-mpris.5.scd +++ b/doc/yambar-modules-mpris.5.scd @@ -51,14 +51,10 @@ mpris - This module provides MPRIS status such as currently playing artist/album :[ *Type* :[ *Req* :< *Description* -| identity -: string +| identities +: list of string : yes -: Identity if the target MPRIS client -| query-timeout -: int -: no -: Timeout for MPRIS clients to respond to queries. Defaults to 500 +: A list of MPRIS client identities # EXAMPLES @@ -66,7 +62,9 @@ mpris - This module provides MPRIS status such as currently playing artist/album bar: center: - mpris: - identity: "spotify" + identities: + - "spotify" + - "firefox" content: - map: conditions: @@ -76,10 +74,25 @@ bar: - string: {text: "{artist}", max: 30 } - string: {text: "-" } - string: {text: "{title}", max: 30 } - - string: {text: "|" } - - string: {text: "{pos} / {end}", max: 30 } ``` +# NOTE + +The 'identity' refers a part of your clients DBus bus name. +You can obtain a list of available bus names using: + +``` +Systemd: > busctl --user --list +Playerctl: > playerctl --list-all +Libdbus: > dbus-send --session --print-reply --type=method_call --dest='org.freedesktop.DBus' /org org.freedesktop.DBus.ListNames + ... | grep 'org.mpris.MediaPlayer2' +``` + +The identity refers to the part after 'org.mpris.MediaPlayer2'. +For example, firefox may use the bus name +'org.mpris.MediaPlayer2.firefox.instance_1_7' and its identity would be +'firefox' + # SEE ALSO *yambar-modules*(5), *yambar-particles*(5), *yambar-tags*(5), *yambar-decorations*(5) diff --git a/modules/mpris.c b/modules/mpris.c index bad1bf1..9fb7683 100644 --- a/modules/mpris.c +++ b/modules/mpris.c @@ -1125,5 +1125,5 @@ const struct module_iface module_mpris_iface = { }; #if defined(CORE_PLUGINS_AS_SHARED_LIBRARIES) -extern const struct module_mpris_iface iface __attribute__((weak, alias("module_iface"))); +extern const struct module_iface iface __attribute__((weak, alias("module_mpris_iface"))); #endif